]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove redundant checks
authorAlan T. DeKok <aland@freeradius.org>
Wed, 9 Jan 2019 15:33:43 +0000 (10:33 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 9 Jan 2019 15:33:43 +0000 (10:33 -0500)
src/modules/rlm_passwd/rlm_passwd.c

index 236ae74cea3e1a700468813f4d91e7f84e09dd04..dfa3e92518fabb73be97ef7e81db981d21a33bda 100644 (file)
@@ -97,7 +97,7 @@ static int string_to_entry(char const* string, int num_fields, char delimiter,
        if(!len) return 0;
        if (string[len-1] == '\r') len--;
        if(!len) return 0;
-       if (!len || !passwd ||
+       if (!passwd ||
            bufferlen < (len + num_fields * sizeof (char*) + num_fields * sizeof (char) + sizeof (struct mypasswd) + 1) ) return 0;
        passwd->next = NULL;
        data_beg=(char *)passwd + sizeof(struct mypasswd);