From b64c621c9de3fa72ff1f1688d8453d99f5cf7352 Mon Sep 17 00:00:00 2001 From: Alex Dowad Date: Thu, 1 May 2014 13:44:06 +0200 Subject: squark-auth-ip: don't print nulls at end of username --- src/blob.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/blob.h') diff --git a/src/blob.h b/src/blob.h index ff137af..244a1e4 100644 --- a/src/blob.h +++ b/src/blob.h @@ -31,6 +31,7 @@ typedef struct blob { #define BLOB_STRLEN(str) (blob_t){(str), strlen(str)} #define BLOB_STR_INIT(str) {(str), sizeof(str)-1} #define BLOB_STR(str) (blob_t) BLOB_STR_INIT(str) +#define BLOB_CHAR_ARRAY(a) (blob_t){(a), strnlen(a, sizeof(a))} #define BLOB_NULL (blob_t){NULL, 0} static inline int blob_is_null(blob_t b) -- cgit v1.2.3