From 0690f040c0537e358bd769ee17efb768fa9a7693 Mon Sep 17 00:00:00 2001 From: Hourier Date: Fri, 14 Feb 2020 21:15:24 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20fd=5Fchop()=20=E3=82=92?= =?utf8?q?=E5=BE=AE=E4=BF=AE=E6=AD=A3=20/=20Adjusted=20fd=5Fchop()=20a=20l?= =?utf8?q?ittle?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util.c b/src/util.c index c43e9075c..2c5cc8062 100644 --- a/src/util.c +++ b/src/util.c @@ -658,9 +658,7 @@ errr fd_seek(int fd, huge n) errr fd_chop(int fd, huge n) { n = n ? n : 0; - if (fd < 0) return -1; - - return 0; + return fd >= 0 ? 0 : -1; } -- 2.11.0