Fixed issues found by the Windows compiler (that I would think would have been flagged by gcc).

git-svn-id: file:///home/mbr/svn/fwknop/trunk@241 510a4753-2344-4c79-9c09-4d669213fbeb
This commit is contained in:
Damien Stuart
2010-07-07 17:32:21 +00:00
parent b098a07f04
commit bbb8f7bcc6
2 changed files with 5 additions and 7 deletions
+4 -7
View File
@@ -378,7 +378,7 @@ static void
process_rc(fko_cli_options_t *options)
{
FILE *rc;
int tmpint, line_num = 0;
int line_num = 0;
char rcfile[MAX_PATH_LEN];
char line[MAX_LINE_LEN];
char curr_stanza[MAX_LINE_LEN] = {0};
@@ -395,8 +395,8 @@ process_rc(fko_cli_options_t *options)
}
strlcpy(rcfile, homedir, MAX_PATH_LEN);
strlcat(rcfile, PATH_SEP);
strlcat(rcfile, ".fwknoprc");
strlcat(rcfile, PATH_SEP, MAX_PATH_LEN);
strlcat(rcfile, ".fwknoprc", MAX_PATH_LEN);
/* Open the rc file for reading, if it does not exist, then create
* an initial .fwknoprc file with defaults and go on.
@@ -672,7 +672,7 @@ config_init(fko_cli_options_t *options, int argc, char **argv)
exit(EXIT_FAILURE);
}
break;
case 'NO_SAVE_ARGS':
case NO_SAVE_ARGS:
options->no_save_args = 1;
break;
case 'n':
@@ -772,9 +772,6 @@ config_init(fko_cli_options_t *options, int argc, char **argv)
case TIME_OFFSET_MINUS:
options->time_offset_minus = parse_time_offset(optarg);
break;
case NO_SAVE_ARGS:
options->no_save_args = 1;
break;
default:
usage();
exit(EXIT_FAILURE);
+1
View File
@@ -53,6 +53,7 @@
#endif
#ifdef WIN32
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define snprintf _snprintf
#define unlink _unlink