diff options
author | 2006-05-23 21:57:15 +0000 | |
---|---|---|
committer | 2006-05-23 21:57:15 +0000 | |
commit | bd01656c0cb5c227ef6bded3b9f1bfc9e873969d (patch) | |
tree | a54104ba549e25fae7fe06bb1b1b21890ded2253 /usr.sbin/tcpdump/print-radius.c | |
parent | - comment out minphys() wrapper which was intended for DMA code, since there (diff) | |
download | wireguard-openbsd-bd01656c0cb5c227ef6bded3b9f1bfc9e873969d.tar.xz wireguard-openbsd-bd01656c0cb5c227ef6bded3b9f1bfc9e873969d.zip |
clean an XXX and don't print preceding ',' on first attribute; ok
canacar@
Diffstat (limited to 'usr.sbin/tcpdump/print-radius.c')
-rw-r--r-- | usr.sbin/tcpdump/print-radius.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/tcpdump/print-radius.c b/usr.sbin/tcpdump/print-radius.c index 759c846c57e..5579564e981 100644 --- a/usr.sbin/tcpdump/print-radius.c +++ b/usr.sbin/tcpdump/print-radius.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-radius.c,v 1.7 2003/11/08 19:17:30 jmc Exp $ */ +/* $OpenBSD: print-radius.c,v 1.8 2006/05/23 21:57:15 stevesk Exp $ */ /* * Copyright (c) 1997 Thomas H. Ptacek. All rights reserved. @@ -237,7 +237,7 @@ static void r_print_hex(int code, int len, const u_char *data) { void radius_print(register const u_char *data, u_int len) { const struct radius_header *rhp; const u_char *pp; - int i, l, ac, al; + int first, l, ac, al; if(len < sizeof(struct radius_header)) { fputs(" [|radius]", stdout); @@ -266,9 +266,12 @@ void radius_print(register const u_char *data, u_int len) { else pp = data + RADFIXEDSZ; - i = 0; /* XXX I don't see what 'i' is supposed to do here. */ + first = 1; while(l) { - if(!i) fputc(',', stdout); i = 0; + if(!first) + fputc(',', stdout); + else + first = 0; ac = *pp++; al = *pp++; |