assoc_file_name(): return length of string
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 30 Oct 2010 16:43:20 +0000 (18:43 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 30 Oct 2010 16:43:20 +0000 (18:43 +0200)
citadel/include/citadel_dirs.h
citadel/utillib/citadel_dirs.c

index 147bf0276ffcc4432e68bee18caaad99b2f6945f..b6039e1d9d3975c3a05b3a7e1721a73f3a9d4349 100644 (file)
@@ -63,7 +63,7 @@ extern void calc_dirs_n_files(int relh, int home, const char *relhome, char  *ct
 
 extern void create_run_directories(long UID, long GUID);
 
-extern void assoc_file_name(char *buf, 
+extern size_t assoc_file_name(char *buf, 
                            size_t n,
                            struct ctdlroom *qrbuf, 
                            const char *prefix);
index 8863b46bdf1be064654ad50007bc85740630200d..f4cc31071b972889c844dab1af6b9c8d75ed3d4f 100644 (file)
@@ -379,10 +379,10 @@ void calc_dirs_n_files(int relh, int home, const char *relhome, char  *ctdldir,
 /*
  * Generate an associated file name for a room
  */
-void assoc_file_name(char *buf, size_t n,
+size_t assoc_file_name(char *buf, size_t n,
                     struct ctdlroom *qrbuf, const char *prefix)
 {
-       snprintf(buf, n, "%s%ld", prefix, qrbuf->QRnumber);
+       return snprintf(buf, n, "%s%ld", prefix, qrbuf->QRnumber);
 }