buffer: untangle assignment from check in makenewline().

For better debuggability.

Michael
This commit is contained in:
Michael Adam committed 2009-08-04 23:47:27 +02:00
1 parent ab4df6edb8
commit 25344751eb
1 file changed
+4 -2
+4 -2
View File
@@ -66,10 +66,12 @@ makenewline (unsigned char *data, size_t length)
assert (data != NULL);
assert (length > 0);
if (!(newline = safemalloc (sizeof (struct bufline_s))))
newline = safemalloc (sizeof (struct bufline_s));
if (!newline)
return NULL;
if (!(newline->string = safemalloc (length)))
newline->string = safemalloc (length);
if (!newline->string)
{
safefree (newline);
return NULL;