]> git.pld-linux.org Git - packages/poldek.git/commitdiff
- was doing a lot of these seeks, use read now
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 20 Apr 2005 21:31:27 +0000 (21:31 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    poldek-cookie.patch -> 1.3

poldek-cookie.patch

index 4a827f2ccfd2106d7623dd2a07ce8d3aed30141f..1a103afef088a9bc7c0e36cfcf2c10790d163ce1 100644 (file)
          nsize = 0;
      } else {
          nsize = ntoh16(nsize);
+diff -urN poldek-0.18.8.org/pkgfl.c poldek-0.18.8/pkgfl.c
+--- poldek-0.18.8.org/pkgfl.c  2004-12-30 13:05:22.000000000 +0100
++++ poldek-0.18.8/pkgfl.c      2005-04-20 23:21:45.000000000 +0200
+@@ -557,12 +557,15 @@
+ int pkgfl_skip_f(FILE *stream) 
+ {
+     uint32_t size;
++    char *buf;
+     
+     if (fread(&size, sizeof(size), 1, stream) != 1)
+         return 0;
+     
+     size = ntoh32(size);
+-    fseek(stream, size + 1, SEEK_CUR);
++    /* skip size + 1 bytes */
++    buf = alloca(size + 1);
++    fread(buf, 1, size + 1, stream);
+     return 1;
+ }
+
This page took 0.70837 seconds and 4 git commands to generate.