From: Harlan Stenn Date: Wed, 12 Nov 2008 07:36:31 +0000 (-0500) Subject: ntp_scanner lint removal X-Git-Tag: NTP_4_2_5P140~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d88e8431ce0f06d3d490fba9efe5e68502b7d9a;p=thirdparty%2Fntp.git ntp_scanner lint removal bk: 491a877fgeKMXPEj9-XqNVuUEiZ6kg --- diff --git a/ChangeLog b/ChangeLog index 1623be496..7e5acce8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* Cleanup lint from the ntp_scanner files. * [Bug 1011] gmtime() returns NULL on windows where it would not under Unix. * Updated caljulian.c and prettydate.c from Juergen Perlinger. (4.2.5p139) 2008/11/11 Released by Harlan Stenn diff --git a/ntpd/ntp_scanner.c b/ntpd/ntp_scanner.c index 3f2c38cc3..afe1777cc 100644 --- a/ntpd/ntp_scanner.c +++ b/ntpd/ntp_scanner.c @@ -603,7 +603,8 @@ yylex() */ if ((expect_string == NO_ARG) && (!instring)) { - if (token = is_keyword(yytext, &expect_string)) + token = is_keyword(yytext, &expect_string); + if (token) return token; else if (is_integer(yytext)) { errno = 0; diff --git a/ntpd/ntp_scanner.h b/ntpd/ntp_scanner.h index 527aa6c69..e5df1a5f7 100644 --- a/ntpd/ntp_scanner.h +++ b/ntpd/ntp_scanner.h @@ -30,7 +30,7 @@ struct key_tok { /* Structure to hold a filename, file pointer and positional info */ struct FILE_INFO { - char *fname; /* Path to the file */ + const char *fname; /* Path to the file */ FILE *fd; /* File Descriptor */ int line_no; /* Line Number in the file being scanned */ int col_no; /* Column Number in the file being scanned */