diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-06-05 15:43:10 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2015-06-05 21:15:37 +0000 |
commit | 1ec868edddbca60e367f0681db8a5ee5aa32fe74 (patch) | |
tree | 2759a88e2b6bc3291b76f29894edde31c2b61124 /plugins/unistim | |
parent | 244f2fbbf6c4167c75c4eb626aa8a73208ba3d8e (diff) | |
download | wireshark-1ec868edddbca60e367f0681db8a5ee5aa32fe74.tar.gz |
Fix a few issues reported by PVS-Studio
See http://www.viva64.com/en/b/0328/ for details
Change-Id: Ic9ddfd690b49401c96cb8a4a277c671f9824be31
Reviewed-on: https://code.wireshark.org/review/8775
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'plugins/unistim')
-rw-r--r-- | plugins/unistim/packet-unistim.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/unistim/packet-unistim.c b/plugins/unistim/packet-unistim.c index d634231f41..a1b653a307 100644 --- a/plugins/unistim/packet-unistim.c +++ b/plugins/unistim/packet-unistim.c @@ -1108,8 +1108,9 @@ dissect_display_switch(proto_tree *msg_tree, hf_display_write_address_char_pos, tvb,offset,1,ENC_BIG_ENDIAN); if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)!= - DISPLAY_WRITE_ADDRESS_LINE_FLAG) + DISPLAY_WRITE_ADDRESS_LINE_FLAG){ offset+=1;msg_len-=1; + } } if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)== DISPLAY_WRITE_ADDRESS_LINE_FLAG){ @@ -1169,8 +1170,9 @@ dissect_display_switch(proto_tree *msg_tree, hf_display_write_address_char_pos, tvb,offset,1,ENC_BIG_ENDIAN); if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)!= - DISPLAY_WRITE_ADDRESS_LINE_FLAG) + DISPLAY_WRITE_ADDRESS_LINE_FLAG){ offset+=1;msg_len-=1; + } } if((address_byte&DISPLAY_WRITE_ADDRESS_LINE_FLAG)== DISPLAY_WRITE_ADDRESS_LINE_FLAG){ |