diff options
author | Jaap Keuter <jaap.keuter@xs4all.nl> | 2016-12-26 14:40:14 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-12-27 04:14:59 +0000 |
commit | 8e6953a64b0b785918d4a234e1eb09de21cfb5b8 (patch) | |
tree | a1d0e61a66d6d2ccf5615b3c32af4ed8060c7b39 | |
parent | fc29f28cb0c72dc93398ef3cae2f9091c2205bec (diff) |
Replace assignment with structure assignment (CID 1397183)
Replace the individual field assignment with struct assignement to
- Reduce code (only single line, but he),
- (Hopefully) show Coverity this is as intended.
Change-Id: I9400b6e38f86acf57018ee7993e66d5b06d1c39c
Reviewed-on: https://code.wireshark.org/review/19434
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | epan/dissectors/packet-snort.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/dissectors/packet-snort.c b/epan/dissectors/packet-snort.c index ee2713e0e0..465c99bf10 100644 --- a/epan/dissectors/packet-snort.c +++ b/epan/dissectors/packet-snort.c @@ -1014,8 +1014,7 @@ snort_dissector(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data memcpy(&wtp, pinfo->phdr, sizeof(wtp)); /* Copying packet details into wtp for writing */ - wtp.ts.secs = pinfo->fd->abs_ts.secs; - wtp.ts.nsecs = pinfo->fd->abs_ts.nsecs; + wtp.ts = pinfo->fd->abs_ts; /* NB: overwriting wtp.ts.nsecs so we can see packet number back if an alert is written for this frame!!!! */ /* TODO: does this seriously affect snort's ability to reason about time? |