Show error at source

This commit is contained in:
Arun Prakash Jana 2020-04-26 14:05:56 +05:30
parent 33fdbc2216
commit e7147c1f39
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -6440,8 +6440,10 @@ static char *load_input()
DPRINTF_D(total_read); DPRINTF_D(total_read);
DPRINTF_D(chunk_count); DPRINTF_D(chunk_count);
if (!entries) if (!entries) {
fprintf(stderr, "0 entries\n");
goto malloc_1; goto malloc_1;
}
input[total_read] = '\0'; input[total_read] = '\0';
@ -6821,10 +6823,8 @@ int main(int argc, char *argv[])
if (!isatty(STDIN_FILENO)) { if (!isatty(STDIN_FILENO)) {
/* This is the same as listpath */ /* This is the same as listpath */
initpath = load_input(); initpath = load_input();
if (!initpath) { if (!initpath)
fprintf(stderr, "!initpath\n");
return _FAILURE; return _FAILURE;
}
/* We return to tty */ /* We return to tty */
dup2(STDOUT_FILENO, STDIN_FILENO); dup2(STDOUT_FILENO, STDIN_FILENO);