chiark
/
gitweb
/
~ian
/
userv-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
33b946d
)
Bugfixes: use -O2, and defend against fgets giving an empty string.
author
ian
<ian>
Sat, 25 Sep 1999 01:06:04 +0000
(
01:06
+0000)
committer
ian
<ian>
Sat, 25 Sep 1999 01:06:04 +0000
(
01:06
+0000)
ipif/Makefile
patch
|
blob
|
history
ipif/service.c
patch
|
blob
|
history
diff --git
a/ipif/Makefile
b/ipif/Makefile
index 24d74adad11c378d633eb91a57672b522eca1076..0d89ae0a8d2548855b75c7eb95d3fcbbd5d36551 100644
(file)
--- a/
ipif/Makefile
+++ b/
ipif/Makefile
@@
-1,7
+1,8
@@
#
#
+OPTIMISE= -O2
CFLAGS= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith \
CFLAGS= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith \
- -Wwrite-strings -g -D_GNU_SOURCE
+ -Wwrite-strings -g
$(OPTIMISE)
-D_GNU_SOURCE
etcdir= /etc
prefix= /usr/local
etcdir= /etc
prefix= /usr/local
diff --git
a/ipif/service.c
b/ipif/service.c
index 0050dd2020078a7f189506ce11283143b5175e3b..18322d4cc71c4c98218aa7b0e6516cdaf7be7afb 100644
(file)
--- a/
ipif/service.c
+++ b/
ipif/service.c
@@
-276,6
+276,7
@@
static void permit(unsigned long pprefix, unsigned long pmask) {
int i, any;
assert(!(pprefix & ~pmask));
int i, any;
assert(!(pprefix & ~pmask));
+ any= 0;
if (!proto) fputs("permits",stdout);
if (addrnet_isin(localaddr,~0UL, pprefix,pmask)) {
if (!proto) fputs("permits",stdout);
if (addrnet_isin(localaddr,~0UL, pprefix,pmask)) {
@@
-679,7
+680,7
@@
static void startslattach(void) {
}
setsigmask(&fullset);
l= strlen(ifnbuf);
}
setsigmask(&fullset);
l= strlen(ifnbuf);
- if (l<0 || ifnbuf[l-1] != '\n') fatal("slattach gave strange output `%s'",ifnbuf);
+ if (l<
=
0 || ifnbuf[l-1] != '\n') fatal("slattach gave strange output `%s'",ifnbuf);
ifnbuf[l-1]= 0;
for (k=l; k>0 && ifnbuf[k-1]!=' '; k--);
ifname= ifnbuf+k;
ifnbuf[l-1]= 0;
for (k=l; k>0 && ifnbuf[k-1]!=' '; k--);
ifname= ifnbuf+k;