debug: Fix a few signed/unsigned hickups
authorVolker Lendecke <vl@samba.org>
Thu, 13 Oct 2016 09:18:50 +0000 (11:18 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 13 Oct 2016 23:47:21 +0000 (01:47 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/debug.c

index ed899448f3152dd856433cbf9658452a6b656a9e..625d23a0a5549621ef2a7b0f861ab2c8b5c4458d 100644 (file)
@@ -280,7 +280,7 @@ static struct debug_backend {
 
 static struct debug_backend *debug_find_backend(const char *name)
 {
-       int i;
+       unsigned i;
 
        for (i = 0; i < ARRAY_SIZE(debug_backends); i++) {
                if (strcmp(name, debug_backends[i].name) == 0) {
@@ -348,7 +348,7 @@ static void debug_set_backends(const char *param)
        size_t str_len = strlen(param);
        char str[str_len+1];
        char *tok, *saveptr;
-       int i;
+       unsigned i;
 
        /*
         * initialize new_log_level to detect backends that have been
@@ -389,7 +389,8 @@ static void debug_set_backends(const char *param)
 static void debug_backends_log(const char *msg, int msg_level)
 {
        char msg_no_nl[FORMAT_BUFR_SIZE];
-       int i, len;
+       unsigned i;
+       int len;
 
        /*
         * Some backends already add an extra newline, so also provide