SSH: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
authorAlexis La Goutte <alexis.lagoutte@gmail.com>
Wed, 22 Jun 2016 19:08:57 +0000 (21:08 +0200)
committerMichael Mann <mmann78@netscape.net>
Wed, 22 Jun 2016 21:24:06 +0000 (21:24 +0000)
Change-Id: If084278acfeb82ae7c91aefff9035f156e8f4f15
Reviewed-on: https://code.wireshark.org/review/16079
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Kenny Root <kenny@the-b.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-ssh.c

index 940f7aeb9dea4889b71a2bf17969b69751a3d27f..43cec6a233615c5f7d7f0a0908094f840dc92563 100644 (file)
@@ -651,11 +651,10 @@ ssh_tree_add_hostkey(tvbuff_t *tvb, int offset, proto_tree *parent_tree, const c
 
     if (0 == strcmp(key_type, "ssh-rsa")) {
         offset += ssh_tree_add_mpint(tvb, offset, tree, hf_ssh_hostkey_rsa_e);
-        offset += ssh_tree_add_mpint(tvb, offset, tree, hf_ssh_hostkey_rsa_n);
+        ssh_tree_add_mpint(tvb, offset, tree, hf_ssh_hostkey_rsa_n);
     } else {
         remaining_len = key_len - (type_len + 4);
         proto_tree_add_item(tree, hf_ssh_hostkey_data, tvb, offset, remaining_len, ENC_NA);
-        offset += remaining_len;
     }
 
     return 4+key_len;