]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove needless check for NULL fp (CID #1503900) (#4468)
authorJames Jones <jejones3141@gmail.com>
Wed, 27 Apr 2022 19:17:12 +0000 (14:17 -0500)
committerGitHub <noreply@github.com>
Wed, 27 Apr 2022 19:17:12 +0000 (15:17 -0400)
src/bin/dhcpclient.c

index d06da8ba5947e9e39f39d66648fb46439c64eaf4..f269f01994907c7b2ae2b6aade486f94a1c5f65c 100644 (file)
@@ -171,7 +171,7 @@ static int request_init(fr_radius_packet_t **out, fr_pair_list_t *packet_vps, ch
        if (fr_pair_list_afrom_file(packet, dict_dhcpv4, packet_vps, fp, &filedone) < 0) {
                fr_perror("dhcpclient");
                fr_radius_packet_free(&packet);
-               if (fp && (fp != stdin)) fclose(fp);
+               if (fp != stdin) fclose(fp);
                return -1;
        }
 
@@ -212,7 +212,7 @@ static int request_init(fr_radius_packet_t **out, fr_pair_list_t *packet_vps, ch
 
        } /* loop over the VP's we read in */
 
-       if (fp && (fp != stdin)) fclose(fp);
+       if (fp != stdin) fclose(fp);
 
        /*
         *      And we're done.