nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 1fde10b022d939229170368f016a495651259d1e
parent 1241a4d75da87999f08bffaec1119f47fbf27384
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sun, 25 Apr 2021 15:05:06 +0530

Fix LGTM alerts

Diffstat:
Mmisc/natool/natool | 2+-
Msrc/nnn.c | 5+++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/misc/natool/natool b/misc/natool/natool @@ -21,7 +21,7 @@ # ############################################################################# import sys -from subprocess import Popen, PIPE, DEVNULL +from subprocess import Popen, PIPE if len(sys.argv) < 3: print('usage: natool [-a] [-l] [-x] [archive] [file/dir]') diff --git a/src/nnn.c b/src/nnn.c @@ -3603,10 +3603,11 @@ static void print_icon(const struct entry *ent, const int attrs) static void print_time(const time_t *timep) { - struct tm *t = localtime(timep); + struct tm t; + localtime_r(timep, &t); printw("%s-%02d-%02d %02d:%02d", - xitoa(t->tm_year + 1900), t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min); + xitoa(t.tm_year + 1900), t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min); } static char get_detail_ind(const mode_t mode)