Wireshark-commits: [Wireshark-commits] master d7a3764: Some cleanups.

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Wed, 06 Mar 2019 10:47:12 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=d7a376447558a671376800c0c910d0afb90918d1
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

d7a3764 by Guy Harris (guy@xxxxxxxxxxxx):

    Some cleanups.
    
    hdr_ethernet is a flag indicating whether we should add a fake Ethernet
    header or not; make it a Boolean.
    
    Move number_of_padding_bytes() closer to where it is in
    ui/text_import.c, and make it more like the version there.
    
    Shift the direction flag to put it in the right bit position - or, at
    least, throw in the shift constant to clarify that we're trying to put
    it there, even if it's already in the right position (i.e., the shift
    constant happens to be 0, as it happens to be in the low-order bits).
    
    Fix a comment.
    
    Change-Id: Ia643d9ab2188951a682bf773239d0175c0d578c2
    Reviewed-on: https://code.wireshark.org/review/32337
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  8f15ebe   srvloc: check buffer index to prevent heap overflow.
     add  d7a3764   Some cleanups.


Summary of changes:
 text2pcap.c | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)