]> Sergey Matveev's repositories - nnn.git/commitdiff
Use custom abs()
authorArun Prakash Jana <engineerarun@gmail.com>
Thu, 18 Oct 2018 17:09:47 +0000 (22:39 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Thu, 18 Oct 2018 17:09:47 +0000 (22:39 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index e23601cc7d18d3e8fb1f1e93fc9f2283803394e5..f30777e06b521e85f812a553be6bc3ad0dfa3d02 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -3477,8 +3477,10 @@ main(int argc, char *argv[])
 
        /* Get screensaver wait time, if set; copier used as tmp var */
        copier = getenv("NNN_IDLE_TIMEOUT");
-       if (copier)
-               idletimeout = abs(atoi(copier));
+       if (copier) {
+               opt = atoi(copier);
+               idletimeout = opt * ((opt > 0) - (opt < 0));
+       }
 
        /* Get the default copier, if set */
        copier = getenv("NNN_COPIER");