Fix Coverity warning for unchecked return value from mkdir()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-02-05 23:13:47 +01:00
1 parent bd58345b8c
commit 5d86137142
1 file changed
+4 -1
+4 -1
View File
@@ -22,7 +22,10 @@ int cond_set_path(const char *path, enum cond_state new)
_e("Invalid path '%s' for condition", path); _e("Invalid path '%s' for condition", path);
return 0; return 0;
} }
makepath(dir); if (makepath(dir)) {
_pe("Failed creating dir '%s' for condition '%s'", dir, path);
return 0;
}
touch(path); touch(path);
utime(path, NULL); utime(path, NULL);
break; break;