summaryrefslogtreecommitdiff
path: root/common/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/buffer.c')
-rw-r--r--common/buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/buffer.c b/common/buffer.c
index 0cb045c..57d20e2 100644
--- a/common/buffer.c
+++ b/common/buffer.c
@@ -561,7 +561,7 @@ void* ha_bufdec64(ha_buffer_t* buf, const char* src, size_t* bytes)
buffer_bump(buf, 4);
if(ha_buferr(buf))
- return;
+ return NULL;
switch(state)
{
@@ -691,13 +691,13 @@ void* ha_bufdechex(ha_buffer_t* buf, const char* src, size_t* bytes)
src++;
}
+ /* We always null terminate anyway */
+ *(buf->_rp++) = 0;
+
/* All bytes have to come in pairs */
if(state != 0)
return NULL;
- /* We always null terminate anyway */
- *(buf->_rp++) = 0;
-
if(bytes)
*bytes = done;