From: Todd C. Miller Date: Tue, 10 May 2016 12:32:55 +0000 (-0600) Subject: Remove unnecessary NULL checks in the RUNAS_CHANGED macro. The X-Git-Tag: SUDO_1_8_17^2~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8b4de84049a3f836608382c16b77d7ca159aecc6;p=sudo Remove unnecessary NULL checks in the RUNAS_CHANGED macro. The 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. --- diff --git a/plugins/sudoers/parse.h b/plugins/sudoers/parse.h index 9f8cfdec4..973d0ac60 100644 --- a/plugins/sudoers/parse.h +++ b/plugins/sudoers/parse.h @@ -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