diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-02-27 09:46:23 -0500 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-02-27 21:10:07 +0000 |
commit | 5e2dcb34cb740b9d26fc02aa36b33a1c3610a4c3 (patch) | |
tree | 4c5feafcda3836f76e9cc8798e17b904e6ffdb9a /epan/dissectors/packet-mip6.c | |
parent | edb5e4b7ff76ebc7c246dcc9c96f346da4bfcc23 (diff) |
Remove a couple useless variables.
This may fix a compile warning-turned-error on an old version of SLES that
Anders reported.
Change-Id: I72e5dec00bc0088cd77a206284221cb43ae89547
Reviewed-on: https://code.wireshark.org/review/7429
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mip6.c')
-rw-r--r-- | epan/dissectors/packet-mip6.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c index 2b1a20c10d..5708fc957c 100644 --- a/epan/dissectors/packet-mip6.c +++ b/epan/dissectors/packet-mip6.c @@ -3105,11 +3105,10 @@ static const value_string mip6_opt_acc_net_id_sub_opt_op_id_type[] = { { 0, NULL} }; -static float degrees_convert_fixed_to_float(guint value) +static float +degrees_convert_fixed_to_float(guint value) { - guint mantissa = 0, exponent = 0, sign = 0, position = 0, mask = 1, *ptrNumber = NULL, i; - float floatNumber = 0; - ptrNumber = (guint *)&floatNumber; + guint mantissa = 0, exponent = 0, sign = 0, position = 0, mask = 1, i; if (!value) return 0; @@ -3138,11 +3137,11 @@ static float degrees_convert_fixed_to_float(guint value) exponent = (position - 15 + 127) << 23; - *ptrNumber = (mantissa | exponent);/* club mantissa, exponent and sign*/ - return floatNumber; + return (float)(mantissa | exponent); /* club mantissa, exponent and sign*/ } -static void degrees_base_custom(gchar *str, guint degrees) +static void +degrees_base_custom(gchar *str, guint degrees) { g_snprintf(str, ITEM_LABEL_LENGTH, "%f", degrees_convert_fixed_to_float(degrees) ); } |