diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-12 14:35:56 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-05-12 14:35:56 +0000 |
commit | c4f12f59cc907577d787f816b37122809f896bb2 (patch) | |
tree | 78b50dbcee80b14f79ce5d2ef12906ed4a40358a /networking/nc_bloaty.c | |
parent | 023dc6798e05373bf33d64221bbe6a7265734c34 (diff) | |
download | busybox-w32-c4f12f59cc907577d787f816b37122809f896bb2.tar.gz busybox-w32-c4f12f59cc907577d787f816b37122809f896bb2.tar.bz2 busybox-w32-c4f12f59cc907577d787f816b37122809f896bb2.zip |
-Wall fixes by Cristian Ionescu-Idbohrn. No object code changes.
Diffstat (limited to 'networking/nc_bloaty.c')
-rw-r--r-- | networking/nc_bloaty.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c index dd94a1460..4ba726eb5 100644 --- a/networking/nc_bloaty.c +++ b/networking/nc_bloaty.c | |||
@@ -374,7 +374,7 @@ create new one, and bind() it. TODO */ | |||
374 | thing to emerge after all the intervening crud. Doesn't work for UDP on | 374 | thing to emerge after all the intervening crud. Doesn't work for UDP on |
375 | any machines I've tested, but feel free to surprise me. */ | 375 | any machines I've tested, but feel free to surprise me. */ |
376 | char optbuf[40]; | 376 | char optbuf[40]; |
377 | int x = sizeof(optbuf); | 377 | socklen_t x = sizeof(optbuf); |
378 | 378 | ||
379 | rr = getsockopt(netfd, IPPROTO_IP, IP_OPTIONS, optbuf, &x); | 379 | rr = getsockopt(netfd, IPPROTO_IP, IP_OPTIONS, optbuf, &x); |
380 | if (rr < 0) | 380 | if (rr < 0) |
@@ -487,7 +487,7 @@ static void oprint(int direction, unsigned char *p, unsigned bc) | |||
487 | memset(&stage[11], ' ', 16*3); | 487 | memset(&stage[11], ' ', 16*3); |
488 | x = bc; | 488 | x = bc; |
489 | } | 489 | } |
490 | sprintf(&stage[1], " %8.8x ", obc); /* xxx: still slow? */ | 490 | sprintf((char *)&stage[1], " %8.8x ", obc); /* xxx: still slow? */ |
491 | bc -= x; /* fix current count */ | 491 | bc -= x; /* fix current count */ |
492 | obc += x; /* fix current offset */ | 492 | obc += x; /* fix current offset */ |
493 | op = &stage[11]; /* where hex starts */ | 493 | op = &stage[11]; /* where hex starts */ |
@@ -627,8 +627,8 @@ Debug("got %d from the net, errno %d", rr, errno); | |||
627 | if (rnleft) { | 627 | if (rnleft) { |
628 | rr = write(1, np, rnleft); | 628 | rr = write(1, np, rnleft); |
629 | if (rr > 0) { | 629 | if (rr > 0) { |
630 | if (o_ofile) | 630 | if (o_ofile) /* log the stdout */ |
631 | oprint('<', np, rr); /* log the stdout */ | 631 | oprint('<', (unsigned char *)np, rr); |
632 | np += rr; /* fix up ptrs and whatnot */ | 632 | np += rr; /* fix up ptrs and whatnot */ |
633 | rnleft -= rr; /* will get sanity-checked above */ | 633 | rnleft -= rr; /* will get sanity-checked above */ |
634 | wrote_out += rr; /* global count */ | 634 | wrote_out += rr; /* global count */ |
@@ -642,8 +642,8 @@ Debug("wrote %d to stdout, errno %d", rr, errno); | |||
642 | rr = rzleft; | 642 | rr = rzleft; |
643 | rr = write(netfd, zp, rr); /* one line, or the whole buffer */ | 643 | rr = write(netfd, zp, rr); /* one line, or the whole buffer */ |
644 | if (rr > 0) { | 644 | if (rr > 0) { |
645 | if (o_ofile) | 645 | if (o_ofile) /* log what got sent */ |
646 | oprint('>', zp, rr); /* log what got sent */ | 646 | oprint('>', (unsigned char *)zp, rr); |
647 | zp += rr; | 647 | zp += rr; |
648 | rzleft -= rr; | 648 | rzleft -= rr; |
649 | wrote_net += rr; /* global count */ | 649 | wrote_net += rr; /* global count */ |