Fix some warnings from pvs-studio

This commit is contained in:
Todd C. Miller
2020-08-12 20:01:39 -06:00
parent 961a4afe67
commit a940a2c78e
5 changed files with 13 additions and 14 deletions

View File

@@ -76,7 +76,7 @@ const char *python_plugin_name(struct PluginContext *plugin_ctx);
// version is enough and "errstr" is valid
#define CALLBACK_SET_ERROR(plugin_ctx, errstr) \
do { \
if ((plugin_ctx)->sudo_api_version >= SUDO_API_MKVERSION(1, 15) && errstr != NULL) { \
if ((plugin_ctx)->sudo_api_version >= SUDO_API_MKVERSION(1, 15)) { \
if (errstr != NULL) \
*errstr = (plugin_ctx)->callback_error; \
} \