summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ip
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-01-07 04:44:13 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2016-01-07 04:44:13 +0100
commit772afbe98c7e74be35e7e5318967ce594e4d93e8 (patch)
tree006ef64214c4ab980ff3125ea812f42235706b5b /sys/src/cmd/ip
parent9c99d0c8d3236b87bd292ac29d4d1b2d5f550bd5 (diff)
format pointer subtraction results with %zd instead of %ld (for long -> intptr on amd64)
Diffstat (limited to 'sys/src/cmd/ip')
-rw-r--r--sys/src/cmd/ip/httpd/sendfd.c2
-rw-r--r--sys/src/cmd/ip/ppp/mppc.c2
-rw-r--r--sys/src/cmd/ip/ppp/ppp.c6
-rw-r--r--sys/src/cmd/ip/snoopy/hdlc.c2
-rw-r--r--sys/src/cmd/ip/snoopy/ttls.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/sys/src/cmd/ip/httpd/sendfd.c b/sys/src/cmd/ip/httpd/sendfd.c
index b3ef1c13b..f0ddc4c39 100644
--- a/sys/src/cmd/ip/httpd/sendfd.c
+++ b/sys/src/cmd/ip/httpd/sendfd.c
@@ -324,7 +324,7 @@ notaccept(HConnect *c, HContent *type, HContent *enc, char *which)
hprint(hout, "Server: Plan9\r\n");
hprint(hout, "Date: %D\r\n", time(nil));
hprint(hout, "Content-Type: text/html\r\n");
- hprint(hout, "Content-Length: %lud\r\n", s - c->xferbuf);
+ hprint(hout, "Content-Length: %zud\r\n", s - c->xferbuf);
if(c->head.closeit)
hprint(hout, "Connection: close\r\n");
else if(!http11(c))
diff --git a/sys/src/cmd/ip/ppp/mppc.c b/sys/src/cmd/ip/ppp/mppc.c
index aaf6fc7f3..52560f996 100644
--- a/sys/src/cmd/ip/ppp/mppc.c
+++ b/sys/src/cmd/ip/ppp/mppc.c
@@ -851,7 +851,7 @@ netlog("***** unknown protocol\n");
return;
}
p += 2;
-netlog("off = %ld ", p-s->his);
+netlog("off = %zd ", p-s->his);
iph = (Iphdr*)p;
len = nhgets(iph->length);
ipcheck(p, len);
diff --git a/sys/src/cmd/ip/ppp/ppp.c b/sys/src/cmd/ip/ppp/ppp.c
index 125893990..4f9ce3cf8 100644
--- a/sys/src/cmd/ip/ppp/ppp.c
+++ b/sys/src/cmd/ip/ppp/ppp.c
@@ -473,7 +473,7 @@ getframe(PPP *ppp, int *protop)
if(ppp->ctcp)
compress_error(ppp->ctcp);
ppp->in.discards++;
- netlog("ppp: discard len %ld/%ld cksum %ux (%ux %ux %ux %ux)\n",
+ netlog("ppp: discard len %zd/%zd cksum %ux (%ux %ux %ux %ux)\n",
BLEN(b), BLEN(buf), fcs, b->rptr[0],
b->rptr[1], b->rptr[2], b->rptr[3]);
}
@@ -506,7 +506,7 @@ putframe(PPP *ppp, int proto, Block *b)
b->rptr += 4;
}
- netlog("ppp: putframe 0x%ux %ld\n", proto, b->wptr-b->rptr);
+ netlog("ppp: putframe 0x%ux %zd\n", proto, BLEN(b));
/* add in the protocol and address, we'd better have left room */
from = b->rptr;
@@ -2272,7 +2272,7 @@ getpap(PPP *ppp, Block *b)
m = (Lcpmsg*)b->rptr;
len = 4;
if(BLEN(b) < 4 || BLEN(b) < (len = nhgets(m->len))){
- syslog(0, LOG, "short pap message (%ld < %d)", BLEN(b), len);
+ syslog(0, LOG, "short pap message (%zd < %d)", BLEN(b), len);
freeb(b);
return;
}
diff --git a/sys/src/cmd/ip/snoopy/hdlc.c b/sys/src/cmd/ip/snoopy/hdlc.c
index fdf2aaac8..1b691d96d 100644
--- a/sys/src/cmd/ip/snoopy/hdlc.c
+++ b/sys/src/cmd/ip/snoopy/hdlc.c
@@ -155,7 +155,7 @@ p_framer(int fd, uchar *pkt, int pktlen)
/* accept if this is a good packet */
if(fcs != PPP_goodfcs)
- print("bad frame %ld %2.2ux %2.2ux!\n", to-pkt, pkt[0], pkt[1]);
+ print("bad frame %zd %2.2ux %2.2ux!\n", to-pkt, pkt[0], pkt[1]);
else
return to-pkt;
}
diff --git a/sys/src/cmd/ip/snoopy/ttls.c b/sys/src/cmd/ip/snoopy/ttls.c
index d5ee1eb72..3441fca7b 100644
--- a/sys/src/cmd/ip/snoopy/ttls.c
+++ b/sys/src/cmd/ip/snoopy/ttls.c
@@ -76,7 +76,7 @@ p_seprint(Msg *m)
m->p = seprint(m->p, m->e, " totallen=%1d", NetL(h->ln));
/* these are not in the header, just print them for our convenience */
- m->p = seprint(m->p, m->e, " dataln=%1ld", m->pe - m->ps);
+ m->p = seprint(m->p, m->e, " dataln=%1zd", m->pe - m->ps);
if ((h->flags & (FlagL|FlagS|FlagM)) == 0 && m->ps == m->pe)
m->p = seprint(m->p, m->e, " ack");