Wireshark-commits: [Wireshark-commits] master fc5ebe2: wiretap: Add a file_gets variant that return

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 07 May 2018 06:44:35 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=fc5ebe217fc2712b60dfaa5d96b66386a041dd42
Submitter: Stig Bjørlykke (stig@xxxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

fc5ebe2 by Роман Донченко (dpb@xxxxxxxxxxxxxx):

    wiretap: Add a file_gets variant that returns a pointer to the NUL terminator
    
    When using file_gets it's very difficult to determine how many characters
    were read, because you can't distinguish between an embedded NUL and
    a short line (note that the last line in a file may not have an LF at the
    end). While it's still possible to do it via prefilling the buffer with
    non-zero values, doing that is cumbersome, inefficient and error-prone.
    This new function makes the task much easier.
    
    The "p" in the name is meant to be reminiscent of the "p" in stpcpy.
    
    Change-Id: I468d5ee71e3b6289925860651ba61b369301b3c9
    Reviewed-on: https://code.wireshark.org/review/27333
    Petri-Dish: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    

Actions performed:

    from  282eb96   pfcp: added IEs 132-139
    adds  fc5ebe2   wiretap: Add a file_gets variant that returns a pointer to the NUL terminator


Summary of changes:
 wiretap/file_wrappers.c | 15 ++++++++++++---
 wiretap/file_wrappers.h |  1 +
 2 files changed, 13 insertions(+), 3 deletions(-)