summaryrefslogtreecommitdiffstats
path: root/lib/libI77/rdfmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libI77/rdfmt.c')
-rw-r--r--lib/libI77/rdfmt.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libI77/rdfmt.c b/lib/libI77/rdfmt.c
index eef745b..3878dd9 100644
--- a/lib/libI77/rdfmt.c
+++ b/lib/libI77/rdfmt.c
@@ -29,10 +29,10 @@ rd_Z(Uint *n, int w, ftnlen len)
if (!hex['0']) {
s = "0123456789";
- while(ch = *s++)
+ while( (ch = *s++) )
hex[ch] = ch - '0' + 1;
s = "ABCDEF";
- while(ch = *s++)
+ while( (ch = *s++) )
hex[ch] = hex[ch + 'a' - 'A'] = ch - 'A' + 11;
}
s = s0 = (char *)x;
@@ -61,7 +61,7 @@ rd_Z(Uint *n, int w, ftnlen len)
return errno = 115;
w = (int)len;
w1 = s - s0;
- w2 = w1+1 >> 1;
+ w2 = (w1+1) >> 1;
t = (char *)n;
if (*(char *)&one) {
/* little endian */
@@ -83,7 +83,7 @@ rd_Z(Uint *n, int w, ftnlen len)
t += i;
}
do {
- *t = hex[*s0 & 0xff]-1 << 4 | hex[s0[1] & 0xff]-1;
+ *t = ((hex[*s0 & 0xff]-1) << 4) | (hex[s0[1] & 0xff]-1);
t += i;
s0 += 2;
}
@@ -387,9 +387,9 @@ rd_POS(char *s)
return(1);
}
#ifdef KR_headers
-rd_ed(p,ptr,len) struct syl *p; char *ptr; ftnlen len;
+int rd_ed(p,ptr,len) struct syl *p; char *ptr; ftnlen len;
#else
-rd_ed(struct syl *p, char *ptr, ftnlen len)
+int rd_ed(struct syl *p, char *ptr, ftnlen len)
#endif
{ int ch;
for(;f__cursor>0;f__cursor--) if((ch=(*f__getn)())<0) return(ch);
@@ -450,9 +450,9 @@ rd_ed(struct syl *p, char *ptr, ftnlen len)
return(errno);
}
#ifdef KR_headers
-rd_ned(p) struct syl *p;
+int rd_ned(p) struct syl *p;
#else
-rd_ned(struct syl *p)
+int rd_ned(struct syl *p)
#endif
{
switch(p->op)
OpenPOWER on IntegriCloud