summaryrefslogtreecommitdiff
path: root/print-ppi.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-08-14 15:29:49 -0700
committerGuy Harris <guy@alum.mit.edu>2011-08-14 15:29:49 -0700
commit961e28032fe43e69bdb3c384eeb69505c53963fa (patch)
tree05d5695bbb75abf2a5f18a31c5b44666dc2018d0 /print-ppi.c
parent2e0ba2d689cbf0abbd8df4408956bcb8a46d50a4 (diff)
downloadtcpdump-961e28032fe43e69bdb3c384eeb69505c53963fa.tar.gz
Declare all local variables before any executable statements.
Some C compilers let you get away with that C++-ism; not all do.
Diffstat (limited to 'print-ppi.c')
-rw-r--r--print-ppi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/print-ppi.c b/print-ppi.c
index b3b71f27..38873c84 100644
--- a/print-ppi.c
+++ b/print-ppi.c
@@ -21,10 +21,11 @@ static inline void
ppi_header_print(struct netdissect_options *ndo, const u_char *bp, u_int length)
{
const ppi_header_t *hdr;
- hdr = (const ppi_header_t *)bp;
u_int32_t dlt;
u_int16_t len;
+ hdr = (const ppi_header_t *)bp;
+
len = EXTRACT_16BITS(&hdr->ppi_len);
dlt = EXTRACT_32BITS(&hdr->ppi_dlt);