diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-08-07 01:05:06 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-08-07 01:05:06 +0000 |
commit | e12b990e9613013db8b76c37bfc81f7c6d6df10f (patch) | |
tree | cf8a71d9f94ef684b4c1298a2a579c011fac6368 | |
parent | 9fe364d7995e7a77b9ccd3d66da624caf08dc6a4 (diff) |
Fix up the handling of end-of-line comments if there's white space
between a protocol name and a comment.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8146 f5534014-38df-0310-8fa8-9805f1628bb7
-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') ; } |