aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/matchproc.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2026-03-02 22:54:43 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2026-03-02 22:54:43 +0100
commitc9ec87701e1c5dc9c3bb615eeacb96931535b4e5 (patch)
treebeac8d840dd673935fe622c74c858b8daad3a0f2 /FICS/matchproc.c
parentee6e5db30e28576274d66cd5b617cd4bf003a36a (diff)
Replaced atoi() with strtol()
Diffstat (limited to 'FICS/matchproc.c')
-rw-r--r--FICS/matchproc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/FICS/matchproc.c b/FICS/matchproc.c
index 36f6a4a..1601c5d 100644
--- a/FICS/matchproc.c
+++ b/FICS/matchproc.c
@@ -42,6 +42,7 @@
#include <sys/resource.h>
#include <err.h>
+#include <stdlib.h>
#include <string.h>
#include "board.h"
@@ -725,7 +726,7 @@ com_match(int p, param_list param)
}
if (param[1].type != TYPE_NULL) {
- int numba; // temp for atoi()
+ int numba;
val = param[1].val.string;
@@ -737,7 +738,8 @@ com_match(int p, param_list param)
if (category[0] != '\0' && board[0] == '\0') {
strlcpy(board, parsebuf, sizeof board);
} else if (isdigit(*parsebuf)) {
- if ((numba = atoi(parsebuf)) < 0) {
+ if ((numba = (int)strtol(parsebuf,
+ (char **)NULL, 10)) < 0) {
pprintf(p, "You can't specify "
"negative time controls."
"\n");