Skip to content

Commit

Permalink
sanity fixes from netbsd-current.
Browse files Browse the repository at this point in the history
- cast diff of pointer into "long" and use %ld.
- need string.h for mem{set,cpy}
  • Loading branch information
itojun committed Dec 12, 1999
1 parent 37eb072 commit b292159
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions kame/kame/tcpdump/print-bgp.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#include <errno.h>
#include <stdio.h>
#include <string.h>

#include "interface.h"
#include "addrtoname.h"
Expand Down
8 changes: 4 additions & 4 deletions kame/kame/tcpdump/print-frag6.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ frag6_print(register const u_char *bp, register const u_char *bp2)
TCHECK(dp->ip6f_offlg);

if (vflag) {
printf("frag (0x%08x:%d|%d)",
printf("frag (0x%08x:%d|%ld)",
ntohl(dp->ip6f_ident),
ntohs(dp->ip6f_offlg & IP6F_OFF_MASK),
sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) -
(bp - bp2) - sizeof(struct ip6_frag));
(long)(bp - bp2) - sizeof(struct ip6_frag));
} else {
printf("frag (%d|%d)",
printf("frag (%d|%ld)",
ntohs(dp->ip6f_offlg & IP6F_OFF_MASK),
sizeof(struct ip6_hdr) + ntohs(ip6->ip6_plen) -
(bp - bp2) - sizeof(struct ip6_frag));
(long)(bp - bp2) - sizeof(struct ip6_frag));
}

#if 0
Expand Down

0 comments on commit b292159

Please sign in to comment.