diff util.c @ 513:ef5a2aa8382b

Refactor input handling.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 05 Jun 2012 22:16:42 +0300
parents 291e3caa91a0
children 8a52651bb88d
line wrap: on
line diff
--- a/util.c	Tue Jun 05 19:56:57 2012 +0300
+++ b/util.c	Tue Jun 05 22:16:42 2012 +0300
@@ -426,10 +426,7 @@
     char *str;
     size_t siz;
 
-    if (buf == NULL)
-        return NULL;
-
-    if (end > buf->len || start >= buf->len)
+    if (buf == NULL || end > buf->len || start >= buf->len)
         return NULL;
 
     if (start <= end)