-check return value
authorChristian Grothoff <christian@grothoff.org>
Wed, 25 Jan 2012 10:23:55 +0000 (10:23 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 25 Jan 2012 10:23:55 +0000 (10:23 +0000)
src/statistics/gnunet-service-statistics.c

index ec3492710a0236aef366dd387b78388c4a6f6863..1d636bd25cb5ba053b1bfd6fe157c4b4a824e480 100644 (file)
@@ -245,7 +245,8 @@ save ()
       if (GNUNET_OK != GNUNET_BIO_write (wh, pos->msg, size))
       {
         GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "write", fn);
-        GNUNET_BIO_write_close (wh);
+        if (GNUNET_OK != GNUNET_BIO_write_close (wh))
+         GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "close", fn);
         wh = NULL;
       }
       else
@@ -255,7 +256,8 @@ save ()
   }
   if (NULL != wh)
   {
-    GNUNET_BIO_write_close (wh);
+    if (GNUNET_OK != GNUNET_BIO_write_close (wh))
+      GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "close", fn);
     if (total == 0)
       GNUNET_break (0 == UNLINK (fn));
     else