diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-08-07 01:05:06 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-08-07 01:05:06 +0000 |
commit | 9a555293e995b792a207b7dd02df11b48fc611eb (patch) | |
tree | cf8a71d9f94ef684b4c1298a2a579c011fac6368 /disabled_protos.c | |
parent | 8d6301800fca9c2e7ce49463667989e0360066b4 (diff) | |
download | wireshark-9a555293e995b792a207b7dd02df11b48fc611eb.tar.gz wireshark-9a555293e995b792a207b7dd02df11b48fc611eb.tar.bz2 wireshark-9a555293e995b792a207b7dd02df11b48fc611eb.zip |
Fix up the handling of end-of-line comments if there's white space
between a protocol name and a comment.
svn path=/trunk/; revision=8146
Diffstat (limited to 'disabled_protos.c')
-rw-r--r-- | disabled_protos.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/disabled_protos.c b/disabled_protos.c index 45b35e9ba7..f2cb3ce9ec 100644 --- a/disabled_protos.c +++ b/disabled_protos.c @@ -1,7 +1,7 @@ /* disabled_protos.c * Code for reading and writing the disabled protocols file. * - * $Id: disabled_protos.c,v 1.1 2003/08/07 00:41:26 guy Exp $ + * $Id: disabled_protos.c,v 1.2 2003/08/07 01:05:06 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -177,18 +177,15 @@ read_disabled_protos_list(char **pref_path_return, int *open_errno_return, /* Skip over trailing white space. */ while ((c = getc(ff)) != EOF && c != '\n' && isspace(c)) ; - if (c != EOF && c != '\n') { + if (c != EOF && c != '\n' && c != '#') { /* Non-white-space after the protocol name; warn about it, in case we come up with a reason to use it. */ g_warning("'%s' line %d has extra stuff after the protocol name.", ff_path, line); - - /* Skip to end of line. */ - while ((c = getc(ff)) != EOF && c != '\n') - ; } - } else if (c == '#') { - /* Comment - skip to end of line. */ + } + if (c != EOF && c != '\n') { + /* Skip to end of line. */ while ((c = getc(ff)) != EOF && c != '\n') ; } |