diff options
author | Miloslav Trmač <mitr@redhat.com> | 2012-07-18 15:57:33 +0200 |
---|---|---|
committer | Miloslav Trmač <mitr@redhat.com> | 2012-07-18 17:13:02 +0200 |
commit | ba8362e12b1615ff79f3cd4349211f47fcb1f325 (patch) | |
tree | 811ad2e253f4ad74d6819d8fe72c32dc26d7939b | |
parent | b7ac3c8762571a756aeb4fe0198ddd97745fa65f (diff) | |
download | libumberlog-ba8362e12b1615ff79f3cd4349211f47fcb1f325.tar.gz libumberlog-ba8362e12b1615ff79f3cd4349211f47fcb1f325.tar.xz libumberlog-ba8362e12b1615ff79f3cd4349211f47fcb1f325.zip |
Fix checking of vasprintf() return value
The (res == NULL) check below should not be necessary per (info libc),
but doesn't hurt, so I have left it in.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-rw-r--r-- | lib/umberlog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/umberlog.c b/lib/umberlog.c index 5666ac1..722a4e8 100644 --- a/lib/umberlog.c +++ b/lib/umberlog.c @@ -264,7 +264,7 @@ _ul_vasprintf_and_advance (const char *fmt, va_list *pap) char *res; va_copy (aq, *pap); - if (vasprintf (&res, fmt, aq) == -1) + if (vasprintf (&res, fmt, aq) < 0) { va_end (aq); return NULL; |