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>
This commit is contained in:
Jaap Keuter 2016-12-26 14:40:14 +01:00 committed by Michael Mann
parent fc29f28cb0
commit 8e6953a64b
1 changed files with 1 additions and 2 deletions

View File

@ -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?