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 5b4773f..c08dd58 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 00da2db..038214f 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 0377ef6..546f63d 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;