summaryrefslogtreecommitdiffstats
path: root/src/blob.h
diff options
context:
space:
mode:
authorAlex Dowad <alexinbeijing@gmail.com>2014-05-01 13:44:06 +0200
committerTimo Teräs <timo.teras@iki.fi>2014-05-01 17:47:26 +0300
commitb64c621c9de3fa72ff1f1688d8453d99f5cf7352 (patch)
treea3d40f5ef1b7abc808fa67035b75e1c2ff4fc753 /src/blob.h
parentc042435504daa7998863a64f9b621e6b73c91555 (diff)
downloadsquark-b64c621c9de3fa72ff1f1688d8453d99f5cf7352.tar.bz2
squark-b64c621c9de3fa72ff1f1688d8453d99f5cf7352.tar.xz
squark-auth-ip: don't print nulls at end of username
Diffstat (limited to 'src/blob.h')
-rw-r--r--src/blob.h1
1 files changed, 1 insertions, 0 deletions
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)