summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/sfio/patches/patch-ae19
1 files changed, 15 insertions, 4 deletions
diff --git a/devel/sfio/patches/patch-ae b/devel/sfio/patches/patch-ae
index 0dcc81d8aff..5a1ade60057 100644
--- a/devel/sfio/patches/patch-ae
+++ b/devel/sfio/patches/patch-ae
@@ -1,22 +1,33 @@
-$NetBSD: patch-ae,v 1.1 1998/11/02 21:18:14 agc Exp $
+$NetBSD: patch-ae,v 1.2 1998/11/03 09:41:33 agc Exp $
Avoid compiler warning.
--- src/lib/sfio/sfwr.c 1998/11/02 17:49:14 1.1
+++ src/lib/sfio/sfwr.c 1998/11/02 17:52:14
-@@ -30,10 +30,14 @@
+@@ -14,8 +14,9 @@
+ reg char* buf;
+ reg size_t n;
+ #endif
+-{ reg char *sp, *wbuf, *endbuf;
++{ reg char *wbuf, *endbuf;
+ reg ssize_t s, w, wr;
++ char *sp;
+
+ s = w = 0;
+ wbuf = buf;
+@@ -30,10 +31,14 @@
sp = buf+1;
if(buf[0] == 0 && buf[_Sfpage-1] == 0)
{ /* check byte at a time until int-aligned */
- while(((Sfulong_t)sp)%sizeof(int))
+ Sfulong_t dumbo;
+
-+ (void) memcpy(&dumbo, sp, sizeof(dumbo));
++ (void) memcpy(&dumbo, &sp, sizeof(dumbo));
+ while(dumbo % sizeof(int) != 0)
{ if(*sp != 0)
goto chk_hole;
sp += 1;
-+ (void) memcpy(&dumbo, sp, sizeof(dumbo));
++ (void) memcpy(&dumbo, &sp, sizeof(dumbo));
}
/* check using int to speed up */