]> granicus.if.org Git - cronie/commitdiff
assingments: remove initialization if value is never used
authorSami Kerola <kerolasa@iki.fi>
Sat, 24 Nov 2012 10:45:14 +0000 (10:45 +0000)
committerTomas Mraz <tmraz@fedoraproject.org>
Mon, 26 Nov 2012 16:03:07 +0000 (17:03 +0100)
The next operation with these variables will overwrite the values set at
init.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
src/database.c
src/pw_dup.c
src/security.c

index 1cf113a4c1d104436b49d8e985f7c19272ff26b6..0bb305c0f2e58a96cd59c297d2c0d386e9b8b1a7 100644 (file)
@@ -281,7 +281,7 @@ void check_inotify_database(cron_db * old_db) {
        DIR *dir;
        struct timeval time;
        fd_set rfds;
-       int retval = 0;
+       int retval;
        char buf[BUF_LEN];
        pid_t pid = getpid();
        time.tv_sec = 0;
index 519dc75ded5c1c106862c9729884e85b3d5f2659..23da57e3efc8559f2e270904db322f76f404d257 100644 (file)
@@ -43,7 +43,7 @@
 struct passwd *
 pw_dup(const struct passwd *pw) {
        char            *cp;
-       size_t           nsize=0, psize=0, gsize=0, dsize=0, ssize=0, total=0;
+       size_t           nsize=0, psize=0, gsize=0, dsize=0, ssize=0, total;
        struct passwd   *newpw;
 
        /* Allocate in one big chunk for easy freeing */
index 83c7d7e978add09d92da1e9412b4bd0a6cfb8c42..64182581cee1a8e90882a6b0fdd53c7d85801d02 100644 (file)
@@ -596,7 +596,7 @@ int crontab_security_access(void) {
 */
 static char **build_env(char **cronenv) {
 #ifdef WITH_PAM
-       char **jobenv = cronenv;
+       char **jobenv;
        char **pamenv = pam_getenvlist(pamh);
        char *cronvar;
        int count = 0;