diff options
Diffstat (limited to 'src/nvim/event/socket.c')
-rw-r--r-- | src/nvim/event/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/event/socket.c b/src/nvim/event/socket.c index af326f9c82..23228aa63a 100644 --- a/src/nvim/event/socket.c +++ b/src/nvim/event/socket.c @@ -40,8 +40,8 @@ int socket_watcher_init(Loop *loop, SocketWatcher *watcher, char *port = host_end + 1; intmax_t iport; - int ret = getdigits_safe(&(char_u *){ (char_u *)port }, &iport); - if (ret == FAIL || iport < 0 || iport > UINT16_MAX) { + int ok = try_getdigits(&(char_u *){ (char_u *)port }, &iport); + if (!ok || iport < 0 || iport > UINT16_MAX) { ELOG("Invalid port: %s", port); return UV_EINVAL; } |