]> granicus.if.org Git - neomutt/commitdiff
create_hcache_dir
authorRichard Russon <rich@flatcap.org>
Tue, 11 Apr 2017 17:16:14 +0000 (18:16 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 11 Apr 2017 23:29:59 +0000 (00:29 +0100)
hcache.c

index 66d5160d8ec6b1c021c98ed7a44bc83ad872e730..4a2d2abf39a97f2aa150f697cbad233e30c31cdf 100644 (file)
--- a/hcache.c
+++ b/hcache.c
@@ -527,28 +527,28 @@ crc_matches(const char *d, unsigned int crc)
  * create_hcache_dir - Create parent dirs for the hcache database
  * @path: Database filename
  *
- * @retval 1 Success
- * @retval 0 Failure (errno set)
+ * @retval true Success
+ * @retval false Failure (errno set)
  */
-static int create_hcache_dir(const char *path)
+static bool create_hcache_dir(const char *path)
 {
   if (!path)
-    return 0;
+    return false;
 
   static char dir[_POSIX_PATH_MAX];
   strfcpy (dir, path, sizeof(dir));
 
   char *p = strrchr (dir, '/');
   if (!p)
-    return 1;
+    return true;
 
   *p = 0;
   if (mutt_mkdir (dir, S_IRWXU | S_IRWXG | S_IRWXO) == 0)
-    return 1;
+    return true;
 
   mutt_error (_("Can't create %s: %s."), dir, strerror (errno));
   mutt_sleep (2);
-  return 0;
+  return false;
 }
 
 /**