git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a563bb
)
Better handling of trailing \n problem.
author
Richard Jones
<rjones@redhat.com>
Tue, 14 Apr 2009 13:38:31 +0000
(14:38 +0100)
committer
Richard Jones
<rjones@redhat.com>
Tue, 14 Apr 2009 13:38:31 +0000
(14:38 +0100)
daemon/command.c
patch
|
blob
|
history
diff --git
a/daemon/command.c
b/daemon/command.c
index
589ca76
..
03537f0
100644
(file)
--- a/
daemon/command.c
+++ b/
daemon/command.c
@@
-79,10
+79,10
@@
do_command_lines (char * const * const argv)
if (pend) {
*pend = '\0';
pend++;
- }
- /* Final \n? Don't return an empty final element. */
- if (pend && *pend == '\0') break;
+ /* Final \n? Don't return an empty final element. */
+ if (*pend == '\0') break;
+ }
if (add_string (&lines, &size, &alloc, p) == -1) {
free (out);
@@
-97,5
+97,5
@@
do_command_lines (char * const * const argv)
if (add_string (&lines, &size, &alloc, NULL) == -1)
return NULL;
- return lines;
+ return lines;
/* Caller frees. */
}