[Midnightbsd-cvs] src [8518] trunk/usr.sbin/pw: dont bother with null check here

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 18 18:59:05 EDT 2016


Revision: 8518
          http://svnweb.midnightbsd.org/src/?rev=8518
Author:   laffer1
Date:     2016-09-18 18:59:05 -0400 (Sun, 18 Sep 2016)
Log Message:
-----------
dont bother with null check here

Modified Paths:
--------------
    trunk/usr.sbin/pw/bitmap.c
    trunk/usr.sbin/pw/pw_group.c

Modified: trunk/usr.sbin/pw/bitmap.c
===================================================================
--- trunk/usr.sbin/pw/bitmap.c	2016-09-18 22:58:51 UTC (rev 8517)
+++ trunk/usr.sbin/pw/bitmap.c	2016-09-18 22:59:05 UTC (rev 8518)
@@ -50,8 +50,7 @@
 void
 bm_dealloc(struct bitmap * bm)
 {
-	if (bm->map)
-		free(bm->map);
+	free(bm->map);
 }
 
 static void

Modified: trunk/usr.sbin/pw/pw_group.c
===================================================================
--- trunk/usr.sbin/pw/pw_group.c	2016-09-18 22:58:51 UTC (rev 8517)
+++ trunk/usr.sbin/pw/pw_group.c	2016-09-18 22:59:05 UTC (rev 8518)
@@ -272,8 +272,7 @@
 
 	pw_log(cnf, mode, W_GROUP, "%s(%ld)", grp->gr_name, (long) grp->gr_gid);
 
-	if (members)
-		free(members);
+	free(members);
 
 	return EXIT_SUCCESS;
 }



More information about the Midnightbsd-cvs mailing list