diff options
Diffstat (limited to 'infutil.c')
-rw-r--r-- | infutil.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -44,7 +44,9 @@ int r; | |||
44 | s->check = (*s->checkfn)(s->check, q, n); | 44 | s->check = (*s->checkfn)(s->check, q, n); |
45 | 45 | ||
46 | /* copy as far as end of window */ | 46 | /* copy as far as end of window */ |
47 | while (n--) *p++ = *q++; | 47 | zmemcpy(p, q, n); |
48 | p += n; | ||
49 | q += n; | ||
48 | 50 | ||
49 | /* see if more to copy at beginning of window */ | 51 | /* see if more to copy at beginning of window */ |
50 | if (q == s->end) | 52 | if (q == s->end) |
@@ -68,7 +70,9 @@ int r; | |||
68 | s->check = (*s->checkfn)(s->check, q, n); | 70 | s->check = (*s->checkfn)(s->check, q, n); |
69 | 71 | ||
70 | /* copy */ | 72 | /* copy */ |
71 | while (n--) *p++ = *q++; | 73 | zmemcpy(p, q, n); |
74 | p += n; | ||
75 | q += n; | ||
72 | } | 76 | } |
73 | 77 | ||
74 | /* update pointers */ | 78 | /* update pointers */ |