gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r23589 - Extractor/src/main


From: gnunet
Subject: [GNUnet-SVN] r23589 - Extractor/src/main
Date: Mon, 3 Sep 2012 16:15:47 +0200

Author: grothoff
Date: 2012-09-03 16:15:47 +0200 (Mon, 03 Sep 2012)
New Revision: 23589

Modified:
   Extractor/src/main/extractor_datasource.c
Log:
add another temporary variable to make clear that the result is unsigned

Modified: Extractor/src/main/extractor_datasource.c
===================================================================
--- Extractor/src/main/extractor_datasource.c   2012-09-03 14:12:30 UTC (rev 
23588)
+++ Extractor/src/main/extractor_datasource.c   2012-09-03 14:15:47 UTC (rev 
23589)
@@ -321,6 +321,7 @@
           int64_t pos, int whence)
 {
   uint64_t npos;
+  size_t nbpos;
 
   switch (whence)
     {
@@ -334,11 +335,11 @@
               (unsigned long long) bfds->fsize);
          return -1;
        }
+      nbpos = bfds->buffer_pos + pos;
       if ( (NULL == bfds->buffer) ||
-          ( (bfds->buffer_pos + pos < bfds->buffer_bytes) &&
-            (bfds->buffer_pos + pos >= 0) ) )
+          (nbpos < bfds->buffer_bytes) )
        {
-         bfds->buffer_pos += pos; 
+         bfds->buffer_pos = nbpos; 
          return npos;
        }
       if (0 != bfds_pick_next_buffer_at (bfds, 




reply via email to

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