Fix Coverity warning for unchecked return value from mkdir()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-02-05 23:13:47 +01:00
parent bd58345b8c
commit 5d86137142
+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);
return 0;
}
makepath(dir);
if (makepath(dir)) {
_pe("Failed creating dir '%s' for condition '%s'", dir, path);
return 0;
}
touch(path);
utime(path, NULL);
break;