X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=hivex%2Fhivexsh.c;h=01a5ddcb7854328c324f8c849cd16a2a5af65e78;hb=253def9de52d744e5ecb75fe0e163276d8ab9653;hp=d7d00bb0925c143203fa74ab18b2f2d2b7e0a3d5;hpb=e3be2251693b305daa566dce5a23aba61a699afc;p=hivex.git diff --git a/hivex/hivexsh.c b/hivex/hivexsh.c index d7d00bb..01a5ddc 100644 --- a/hivex/hivexsh.c +++ b/hivex/hivexsh.c @@ -146,7 +146,8 @@ main (int argc, char *argv[]) char *buf = rl_gets (prompt_string); if (!buf) { quit = 1; - printf ("\n"); + if (is_tty) + printf ("\n"); break; } @@ -219,7 +220,7 @@ set_prompt_string (void) fp = open_memstream (&ptr, &size); if (fp == NULL) { perror ("open_memstream"); - exit (1); + exit (EXIT_FAILURE); } if (h) { @@ -569,7 +570,7 @@ cmd_ls (char *args) char **names = calloc (len, sizeof (char *)); if (names == NULL) { perror ("malloc"); - exit (1); + exit (EXIT_FAILURE); } int ret = -1;