From 599150a3fc4811bd8e66777cf9f1a4e6c371d947 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Fri, 20 Jul 2012 18:13:49 -0400 Subject: [PATCH] CID 701957: opendir() NULL returns weren't accounted for. --- src/tools/rm_attrs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rm_attrs.cpp b/src/tools/rm_attrs.cpp index 49a696ed45..e25ee9af57 100644 --- a/src/tools/rm_attrs.cpp +++ b/src/tools/rm_attrs.cpp @@ -89,7 +89,7 @@ remove_dir_contents(Path& path, bool force, bool removeAttributes) { // open the dir DIR* dir = opendir(path.GetPath()); - if (dir < 0) { + if (dir == NULL) { fprintf(stderr, "Error: Failed to open dir \"%s\": %s\n", path.GetPath(), strerror(errno)); return;