]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove redundant check
authorAlan T. DeKok <aland@freeradius.org>
Wed, 9 Jan 2019 17:23:54 +0000 (12:23 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 9 Jan 2019 21:11:14 +0000 (16:11 -0500)
src/bin/radict.c
src/bin/radsniff.c
src/bin/unit_test_attribute.c

index 79ef149523494f21267ae0d30ade90f5b8cefc15..6149e6b4b99ee3ef73749d1e8b448bae1765581f 100644 (file)
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
                        fr_dict_export(&count, &low, &high, *dict_p);
                        DEBUG2("Attribute count %" PRIu64, count);
                        DEBUG2("Memory allocd %zu (bytes)", talloc_total_size(*dict_p));
-                       DEBUG2("Memory spread %zu (bytes)", (high - low));
+                       DEBUG2("Memory spread %zu (bytes)", (size_t) (high - low));
                } while (++dict_p < dict_end);
        }
 
index 137a4d8d03dd4db812ff28537f53f8401e1221fd..a021d531fd066d24b2afad996b6d1521018a2f4c 100644 (file)
@@ -208,7 +208,7 @@ static void rs_time_print(char *out, size_t len, struct timeval const *t)
 
        if (usec) {
                while (usec < 100000) usec *= 10;
-               snprintf(out + ret, len - ret, ".%i", usec);
+               snprintf(out + ret, len - ret, ".%u", usec);
        } else {
                snprintf(out + ret, len - ret, ".000000");
        }
index e929c074d0dc88a59a34d32dea9edbae97edc95e..95f51ef133bfd88e44148eebd186eb5b1911ef8b 100644 (file)
@@ -707,7 +707,7 @@ static void command_add(TALLOC_CTX *ctx, char *input, char *output, size_t outle
        p++;
 
 
-       if (input) parent = talloc_strdup(ctx, input);
+       parent = talloc_strdup(ctx, input);
 
        /*
         *      Set the name and try to find the syntax.