Move cppcheck suppression annotation to where it needs to be.
This commit is contained in:
@@ -52,7 +52,6 @@ sudo_mkdir_parents_v1(char *path, uid_t uid, gid_t gid, mode_t mode, bool quiet)
|
|||||||
char *slash = path;
|
char *slash = path;
|
||||||
debug_decl(sudo_mkdir_parents, SUDO_DEBUG_UTIL);
|
debug_decl(sudo_mkdir_parents, SUDO_DEBUG_UTIL);
|
||||||
|
|
||||||
/* cppcheck-suppress nullPointerRedundantCheck */
|
|
||||||
while ((slash = strchr(slash + 1, '/')) != NULL) {
|
while ((slash = strchr(slash + 1, '/')) != NULL) {
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
int dfd;
|
int dfd;
|
||||||
@@ -106,6 +105,7 @@ reopen:
|
|||||||
debug_return_bool(true);
|
debug_return_bool(true);
|
||||||
bad:
|
bad:
|
||||||
/* We must restore the path before we return. */
|
/* We must restore the path before we return. */
|
||||||
|
/* cppcheck-suppress nullPointerRedundantCheck */
|
||||||
*slash = '/';
|
*slash = '/';
|
||||||
debug_return_bool(false);
|
debug_return_bool(false);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user