]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Try to silence some warnings from "checker".
authorWayne Davison <wayned@samba.org>
Sat, 7 Nov 2009 17:46:20 +0000 (09:46 -0800)
committerWayne Davison <wayned@samba.org>
Sat, 7 Nov 2009 17:46:20 +0000 (09:46 -0800)
log.c
main.c
options.c

diff --git a/log.c b/log.c
index 5b4773fb5d6169df5574ad616510139a6002092f..c08dd5809280627216fbf0d9bd2ede6e7d91451a 100644 (file)
--- a/log.c
+++ b/log.c
@@ -804,7 +804,7 @@ int log_format_has(const char *format, char esc)
                return 0;
 
        for (p = format; (p = strchr(p, '%')) != NULL; ) {
-               for (p++; *p == '\''; p++) {}
+               for (p++; *p == '\''; p++) {} /*SHARED ITERATOR*/
                if (*p == '-')
                        p++;
                while (isDigit(p))
diff --git a/main.c b/main.c
index 00da2db9865781c1d7381a5a32fb2145595825bf..038214fda7aba753b4be1e2b45f6b809d5057577 100644 (file)
--- a/main.c
+++ b/main.c
@@ -404,7 +404,7 @@ static pid_t do_cmd(char *cmd, char *machine, char *user, char **remote_argv, in
                        cmd = rsh_env;
                if (!cmd)
                        cmd = RSYNC_RSH;
-               cmd = strdup(cmd); /* MEMORY LEAK */
+               cmd = strdup(cmd); /*MEMORY LEAK*/
                if (!cmd)
                        goto oom;
 
index 0377ef6f2f6bf025cec5cfcd45f18a714d0f9457..546f63d81496737e6603e0c32430e8e287e57776 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1421,14 +1421,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                                arg = sanitize_path(NULL, arg, NULL, 0, SP_DEFAULT);
                        if (daemon_filter_list.head) {
                                int rej;
-                               char *dir, *cp = strdup(arg);
+                               char *cp = strdup(arg);
                                if (!cp)
                                        out_of_memory("parse_arguments");
                                if (!*cp)
-                                       goto options_rejected;
-                               dir = cp + (*cp == '/' ? module_dirlen : 0);
-                               clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
-                               rej = check_filter(&daemon_filter_list, FLOG, dir, 0) < 0;
+                                       rej = 1;
+                               else {
+                                       char *dir = cp + (*cp == '/' ? module_dirlen : 0);
+                                       clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+                                       rej = check_filter(&daemon_filter_list, FLOG, dir, 0) < 0;
+                               }
                                free(cp);
                                if (rej)
                                        goto options_rejected;