From: Arun Prakash Jana Date: Sun, 26 Apr 2020 08:35:56 +0000 (+0530) Subject: Show error at source X-Git-Tag: v3.2~98 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e7147c1f3945690b555fd00e3740b8853e9755df;p=nnn.git Show error at source --- diff --git a/src/nnn.c b/src/nnn.c index dfceb764..97a18ff4 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -6440,8 +6440,10 @@ static char *load_input() DPRINTF_D(total_read); DPRINTF_D(chunk_count); - if (!entries) + if (!entries) { + fprintf(stderr, "0 entries\n"); goto malloc_1; + } input[total_read] = '\0'; @@ -6821,10 +6823,8 @@ int main(int argc, char *argv[]) if (!isatty(STDIN_FILENO)) { /* This is the same as listpath */ initpath = load_input(); - if (!initpath) { - fprintf(stderr, "!initpath\n"); + if (!initpath) return _FAILURE; - } /* We return to tty */ dup2(STDOUT_FILENO, STDIN_FILENO);