From: Arun Prakash Jana Date: Thu, 25 Jun 2020 14:29:47 +0000 (+0530) Subject: Simplify check X-Git-Tag: v3.3~18 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=37e5e6189a10ce0da8df4dbdb64398cf7a02c0bd;p=nnn.git Simplify check --- diff --git a/src/nnn.c b/src/nnn.c index ef20b13d..4e140577 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4321,13 +4321,11 @@ static void readpipe(int fd, char **path, char **lastname, char **lastdir) char ctx, *nextpath = NULL; ssize_t len = read_nointr(fd, g_buf, 1); - if (len != 1) + if (len != 1 || g_buf[0] < '0') return; if (g_buf[0] == '+') ctx = (char)(get_free_ctx() + 1); - else if (g_buf[0] < '0') - return; else { ctx = g_buf[0] - '0'; if (ctx > CTX_MAX)