diff options
-rw-r--r-- | mbbsd/chc.c | 2 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 2 | ||||
-rw-r--r-- | mbbsd/pfterm.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/chc.c b/mbbsd/chc.c index 82087703..602fc37e 100644 --- a/mbbsd/chc.c +++ b/mbbsd/chc.c @@ -949,7 +949,7 @@ chc_replay(FILE* fp) /* /\[(Red|Black) "([a-zA-Z0-9]+)"\]/; $2 */ userec_t rec; char *userid; - char *strtok_pos; + char *strtok_pos = NULL; ChessUser *user = (buf[1] == 'R' ? &info->user1 : &info->user2); diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 5dbfe95f..8f62ad7e 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1819,7 +1819,7 @@ static int check_banip(char *host) { unsigned int thisip = 0; char *ptr, *myhost = strdup(host); - char *strtok_pos; + char *strtok_pos = NULL; for( ptr = strtok_r(myhost, ".", &strtok_pos) ; ptr != NULL ; ptr = strtok_r(NULL, ".", &strtok_pos) ) thisip = thisip * 256 + atoi(ptr); diff --git a/mbbsd/pfterm.c b/mbbsd/pfterm.c index 32df0324..bffb225b 100644 --- a/mbbsd/pfterm.c +++ b/mbbsd/pfterm.c @@ -1489,7 +1489,7 @@ fterm_exec(void) { ftchar cmd = ft.cmd[ft.szcmd-1]; char *p = (char*)ft.cmd + 2; // ESC [ - int n = -1, x, y; + int n = -1, x = -1, y; ft.cmd[ft.szcmd] = 0; |