From: Christian Grothoff Date: Wed, 25 Jan 2012 10:23:55 +0000 (+0000) Subject: -check return value X-Git-Tag: initial-import-from-subversion-38251~15124 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1ef2fb4f10b28baba861357efe2593e2a735ffdf;p=oweals%2Fgnunet.git -check return value --- diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index ec3492710..1d636bd25 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c @@ -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