From 5d86137142a5662bc74f0c7897fbdb499789c2a0 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Fri, 5 Feb 2016 23:13:47 +0100 Subject: [PATCH] Fix Coverity warning for unchecked return value from mkdir() Signed-off-by: Joachim Nilsson --- cond-w.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cond-w.c b/cond-w.c index 38d566a2..a3193467 100644 --- a/cond-w.c +++ b/cond-w.c @@ -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;