Wireshark-commits: [Wireshark-commits] master 7130875: Convert fixed-point binary to floating-point

Date Prev · Date Next · Thread Prev · Thread Next
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 28 Feb 2015 20:36:01 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=71308753fec925e618a1b6e9cba25f7a7a407377
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

7130875 by Guy Harris (guy@xxxxxxxxxxxx):

    Convert fixed-point binary to floating-point in a portable fashion.
    
    No need to try to construct an IEEE floating-point number by hand, piece
    by piece; just sign-extend the value to 32 bits, convert that integral
    value to a floating-point value, and divide the result by 32768 to
    properly scale the value.
    
    (Yes, in practice, the chances are overwhelming that we'll be running on
    a machine with IEEE floating point - people probably won't be running us
    on a VAX, and the UN*Xes on which we're likely to run on a System/3x0 or
    z/Architecture machine require, and use, the new IEEE floating-point
    capabilities - but no need to be gratuitiously non-portable.)
    
    Change-Id: Ie90a61847e68c3b849de2984139a97004a4ad659
    Reviewed-on: https://code.wireshark.org/review/7444
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  5892d3c   Don't use ctime().
    adds  7130875   Convert fixed-point binary to floating-point in a portable fashion.


Summary of changes:
 epan/dissectors/packet-mip6.c |   45 +++++++++++++++++++----------------------
 1 file changed, 21 insertions(+), 24 deletions(-)