gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r30647 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r30647 - gnunet/src/util
Date: Sat, 9 Nov 2013 21:47:43 +0100

Author: grothoff
Date: 2013-11-09 21:47:43 +0100 (Sat, 09 Nov 2013)
New Revision: 30647

Modified:
   gnunet/src/util/disk.c
Log:
-check for NULL, doxygen

Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c      2013-11-09 20:47:23 UTC (rev 30646)
+++ gnunet/src/util/disk.c      2013-11-09 20:47:43 UTC (rev 30647)
@@ -289,7 +289,7 @@
 int
 GNUNET_DISK_file_size (const char *filename,
                       uint64_t * size,
-                       int include_symbolic_links, 
+                       int include_symbolic_links,
                       int single_file_mode)
 {
   struct GetFileSizeData gfsd;
@@ -1385,7 +1385,7 @@
  *
  * @param unused not used
  * @param fn directory to remove
- * @return GNUNET_OK
+ * @return #GNUNET_OK
  */
 static int
 remove_helper (void *unused, const char *fn)
@@ -1399,15 +1399,19 @@
  * Remove all files in a directory (rm -rf). Call with
  * caution.
  *
- *
  * @param filename the file to remove
- * @return GNUNET_OK on success, GNUNET_SYSERR on error
+ * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
  */
 int
 GNUNET_DISK_directory_remove (const char *filename)
 {
   struct stat istat;
 
+  if (NULL == filename)
+  {
+    GNUNET_break (0);
+    return GNUNET_SYSERR;
+  }
   if (0 != LSTAT (filename, &istat))
     return GNUNET_NO;           /* file may not exist... */
   (void) CHMOD (filename, S_IWUSR | S_IRUSR | S_IXUSR);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]