git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hivexsh: Change some exit(1) -> exit(EXIT_FAILURE)
[libguestfs.git]
/
hivex
/
hivexsh.c
diff --git
a/hivex/hivexsh.c
b/hivex/hivexsh.c
index
d7d00bb
..
01a5ddc
100644
(file)
--- 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;
char *buf = rl_gets (prompt_string);
if (!buf) {
quit = 1;
- printf ("\n");
+ if (is_tty)
+ printf ("\n");
break;
}
break;
}
@@
-219,7
+220,7
@@
set_prompt_string (void)
fp = open_memstream (&ptr, &size);
if (fp == NULL) {
perror ("open_memstream");
fp = open_memstream (&ptr, &size);
if (fp == NULL) {
perror ("open_memstream");
- exit (
1
);
+ exit (
EXIT_FAILURE
);
}
if (h) {
}
if (h) {
@@
-569,7
+570,7
@@
cmd_ls (char *args)
char **names = calloc (len, sizeof (char *));
if (names == NULL) {
perror ("malloc");
char **names = calloc (len, sizeof (char *));
if (names == NULL) {
perror ("malloc");
- exit (
1
);
+ exit (
EXIT_FAILURE
);
}
int ret = -1;
}
int ret = -1;