]> granicus.if.org Git - sudo/commitdiff
Remove unnecessary NULL checks in the RUNAS_CHANGED macro. The
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 10 May 2016 12:32:55 +0000 (06:32 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 10 May 2016 12:32:55 +0000 (06:32 -0600)
only place where the pointers could be NULL is in visudo_json.c but
we already check for "next" being NULL there.  Quiets a cppcheck
warning.

plugins/sudoers/parse.h

index 9f8cfdec4098feb887da473e08d59de3ed0b809c..973d0ac60e3e6448730ca94e680192b340dc532d 100644 (file)
@@ -71,8 +71,7 @@
  * Returns true if the runas user and group lists match, else false.
  */
 #define RUNAS_CHANGED(cs1, cs2) \
-    ((cs1) == NULL || (cs2) == NULL || \
-     (cs1)->runasuserlist != (cs2)->runasuserlist || \
+     ((cs1)->runasuserlist != (cs2)->runasuserlist || \
      (cs1)->runasgrouplist != (cs2)->runasgrouplist)
 
 #define SUDO_DIGEST_SHA224     0