]> git.pld-linux.org Git - packages/file.git/commitdiff
- make offset zero initially
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 24 Nov 2006 22:55:18 +0000 (22:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    file-offset.patch -> 1.1

file-offset.patch [new file with mode: 0644]

diff --git a/file-offset.patch b/file-offset.patch
new file mode 100644 (file)
index 0000000..36dc9b6
--- /dev/null
@@ -0,0 +1,19 @@
+--- file-4.18.org/src/funcs.c  2006-10-31 20:37:17.000000000 +0100
++++ file/src/funcs.c   2006-11-25 00:52:17.259907000 +0100
+@@ -151,10 +151,16 @@
+ protected int
+ file_reset(struct magic_set *ms)
+ {
++      struct mlist *ml;
+       if (ms->mlist == NULL) {
+               file_error(ms, 0, "no magic files loaded");
+               return -1;
+       }
++      for (ml = ms->mlist->next; ml != ms->mlist; ml = ml->next) {
++              uint32_t magindex;
++              for (magindex = 0; magindex < ml->nmagic; magindex++)
++                      ml->magic[magindex].offset = 0;
++      }
+       ms->o.ptr = ms->o.buf;
+       ms->haderr = 0;
+       ms->error = -1;
This page took 0.174855 seconds and 4 git commands to generate.