aboutsummaryrefslogtreecommitdiffstats
path: root/src/kvstorage_file.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-12-20 17:11:39 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-12-20 17:11:39 +0300
commitea1da6a43cf4f6bfcc23722a05baaae203a00db4 (patch)
tree1bbc911a153e4968d9e14f98f74f1de195c2bc49 /src/kvstorage_file.c
parent9e611e033cfc40aab58805d8e485f892352750c6 (diff)
downloadrspamd-ea1da6a43cf4f6bfcc23722a05baaae203a00db4.tar.gz
rspamd-ea1da6a43cf4f6bfcc23722a05baaae203a00db4.zip
Make compiler happy in several cases, remove warnings.
Diffstat (limited to 'src/kvstorage_file.c')
-rw-r--r--src/kvstorage_file.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/kvstorage_file.c b/src/kvstorage_file.c
index 73e5a8a88..de06f778b 100644
--- a/src/kvstorage_file.c
+++ b/src/kvstorage_file.c
@@ -339,11 +339,17 @@ rspamd_recursive_mkdir (guint levels)
return FALSE;
}
else if (levels > 1) {
- chdir (nbuf);
+ if (chdir (nbuf) == -1) {
+ msg_err ("chdir to %s failed: %s", nbuf, strerror (errno));
+ return FALSE;
+ }
if (! rspamd_recursive_mkdir (levels - 1)) {
return FALSE;
}
- chdir ("../");
+ if (chdir ("../") == -1) {
+ msg_err ("chdir to ../ failed: %s", strerror (errno));
+ return FALSE;
+ }
}
}
}
@@ -378,11 +384,15 @@ rspamd_file_init (struct rspamd_kv_backend *backend)
db->initialized = TRUE;
- chdir (pathbuf);
+ if (chdir (pathbuf) == -1) {
+ msg_err ("chdir to %s failed: %s", pathbuf, strerror (errno));
+ }
return;
err:
if (pathbuf[0] != '\0') {
- chdir (pathbuf);
+ if (chdir (pathbuf) == -1) {
+ msg_err ("chdir to %s failed: %s", pathbuf, strerror (errno));
+ }
}
}