diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-03-18 13:13:44 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-13 16:18:25 +0000 |
commit | e2e84563eeb1e7b9add817d2b0c39656fab297d5 (patch) | |
tree | 083a272cec243de00c603c63a395c0e3e91c04d6 /epan/prefs.c | |
parent | 92ef3d0b55a37f042e1ce7e208e7f39cb49b9bce (diff) | |
download | wireshark-e2e84563eeb1e7b9add817d2b0c39656fab297d5.tar.gz wireshark-e2e84563eeb1e7b9add817d2b0c39656fab297d5.tar.bz2 wireshark-e2e84563eeb1e7b9add817d2b0c39656fab297d5.zip |
Use getc_unlocked in a few places.
Use getc_unlocked or _fgetc_nolock instead of getc in a few places. This
reduces startup time by about 100ms here.
Change-Id: I59ceb09678457c871cce79fcc3ce71998fe4f5af
Reviewed-on: https://code.wireshark.org/review/14518
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/prefs.c')
-rw-r--r-- | epan/prefs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/prefs.c b/epan/prefs.c index 9a7a66e504..93be10a9ce 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -3463,12 +3463,12 @@ read_prefs_file(const char *pf_path, FILE *pf, } rewind(pf); - while ((got_c = getc(pf)) != EOF) { + while ((got_c = ws_getc_unlocked(pf)) != EOF) { if (got_c == '\r') { /* Treat CR-LF at the end of a line like LF, so that if we're reading * a Windows-format file on UN*X, we handle it the same way we'd handle * a UN*X-format file. */ - got_c = getc(pf); + got_c = ws_getc_unlocked(pf); if (got_c == EOF) break; if (got_c != '\n') { |