diff options
| author | 2018-10-18 22:39:47 +0530 | |
|---|---|---|
| committer | 2018-10-18 22:39:47 +0530 | |
| commit | f8b492803f205f1d85fbfa443167f4541a054381 (patch) | |
| tree | 291be08197391d1877a437bebafc64988013c401 | |
| parent | 5a3a27933c78dfc09cbfe95dd0e92a7415de5d8f (diff) | |
| download | nnn-f8b492803f205f1d85fbfa443167f4541a054381.tar.gz | |
Use custom abs()
| -rw-r--r-- | nnn.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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"); |