gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9477 - Extractor/src/plugins


From: gnunet
Subject: [GNUnet-SVN] r9477 - Extractor/src/plugins
Date: Fri, 13 Nov 2009 04:09:22 -0700

Author: grothoff
Date: 2009-11-13 04:09:22 -0700 (Fri, 13 Nov 2009)
New Revision: 9477

Modified:
   Extractor/src/plugins/debextractor.c
   Extractor/src/plugins/id3v23extractor.c
Log:
cleaning up types

Modified: Extractor/src/plugins/debextractor.c
===================================================================
--- Extractor/src/plugins/debextractor.c        2009-11-13 10:51:43 UTC (rev 
9476)
+++ Extractor/src/plugins/debextractor.c        2009-11-13 11:09:22 UTC (rev 
9477)
@@ -63,7 +63,7 @@
 
 typedef struct
 {
-  char *text;
+  const char *text;
   EXTRACTOR_KeywordType type;
 } Matches;
 
@@ -242,13 +242,11 @@
 processControlTGZ (const unsigned char *data,
                    size_t size, struct EXTRACTOR_Keywords *prev)
 {
-  size_t bufSize;
+  uint32_t bufSize;
   char *buf;
   z_stream strm;
 
-  bufSize =
-    data[size - 4] + 256 * data[size - 3] + 65536 * data[size - 2] +
-    256 * 65536 * data[size - 1];
+  bufSize = data[size - 4] + (data[size - 3] << 8) + (data[size - 2] << 16) + 
(data[size - 1] << 24);
   if (bufSize > MAX_CONTROL_SIZE)
     return prev;
 

Modified: Extractor/src/plugins/id3v23extractor.c
===================================================================
--- Extractor/src/plugins/id3v23extractor.c     2009-11-13 10:51:43 UTC (rev 
9476)
+++ Extractor/src/plugins/id3v23extractor.c     2009-11-13 11:09:22 UTC (rev 
9477)
@@ -18,7 +18,6 @@
      Boston, MA 02111-1307, USA.
 
  */
-
 #define DEBUG_EXTRACT_ID3v23 0
 
 #include "platform.h"
@@ -51,7 +50,7 @@
 
 typedef struct
 {
-  char *text;
+  const char *text;
   EXTRACTOR_KeywordType type;
 } Matches;
 
@@ -110,10 +109,13 @@
   int unsync;
   int extendedHdr;
   int experimental;
-  unsigned int tsize;
-  unsigned int pos;
-  unsigned int ehdrSize;
-  unsigned int padding;
+  uint32_t tsize;
+  uint32_t pos;
+  uint32_t ehdrSize;
+  uint32_t padding;
+  uint32_t csize;
+  int i;
+  uint16_t flags;
 
   if ((size < 16) ||
       (data[0] != 0x49) ||
@@ -147,10 +149,6 @@
 
   while (pos < tsize)
     {
-      size_t csize;
-      int i;
-      unsigned short flags;
-
       if (pos + 10 > tsize)
         return prev;
       csize =





reply via email to

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