-dead
[oweals/gnunet.git] / src / util / container_bloomfilter.c
index 8d0852fc93f813397c01d25c6d2484ec8e1fefd5..1a2c876f96685949dd474c482faa3e9e61ce8b1d 100644 (file)
@@ -231,7 +231,7 @@ static void
 decrementBit (char *bitArray, unsigned int bitIdx,
               const struct GNUNET_DISK_FileHandle *fh)
 {
-  OFF_T fileSlot;
+  OFF_T fileslot;
   unsigned char value;
   unsigned int high;
   unsigned int low;
@@ -240,9 +240,13 @@ decrementBit (char *bitArray, unsigned int bitIdx,
   if (GNUNET_DISK_handle_invalid (fh))
     return;                     /* cannot decrement! */
   /* Each char slot in the counter file holds two 4 bit counters */
-  fileSlot = bitIdx / 2;
+  fileslot = bitIdx / 2;
   targetLoc = bitIdx % 2;
-  GNUNET_DISK_file_seek (fh, fileSlot, GNUNET_DISK_SEEK_SET);
+  if (GNUNET_SYSERR == GNUNET_DISK_file_seek (fh, fileslot, GNUNET_DISK_SEEK_SET))
+    {
+      GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "seek");
+      return;
+    }
   if (1 != GNUNET_DISK_file_read (fh, &value, 1))
     value = 0;
   low = value & 0xF;
@@ -268,7 +272,11 @@ decrementBit (char *bitArray, unsigned int bitIdx,
     }
   }
   value = ((high << 4) | low);
-  GNUNET_DISK_file_seek (fh, fileSlot, GNUNET_DISK_SEEK_SET);
+  if (GNUNET_SYSERR == GNUNET_DISK_file_seek (fh, fileslot, GNUNET_DISK_SEEK_SET))
+    {
+      GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "seek");
+      return;
+    }
   GNUNET_assert (1 == GNUNET_DISK_file_write (fh, &value, 1));
 }