diff options
Diffstat (limited to 'usr.bin/locate')
-rw-r--r-- | usr.bin/locate/locate/util.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/locate/locate/util.c b/usr.bin/locate/locate/util.c index ab77699..944ca88 100644 --- a/usr.bin/locate/locate/util.c +++ b/usr.bin/locate/locate/util.c @@ -231,13 +231,16 @@ int getwm(p) caddr_t p; { - static char buf[INTSIZE]; + union { + char buf[INTSIZE]; + int i; + } u; register int i; for (i = 0; i < INTSIZE; i++) - buf[i] = *p++; + u.buf[i] = *p++; - i = *(int *)buf; + i = u.i; if (i > MAXPATHLEN || i < -(MAXPATHLEN)) { i = ntohl(i); |