From b92ac91b7e6de9979053e3185843def1b5423f14 Mon Sep 17 00:00:00 2001 From: "tg(x)" <*@tg-x.net> Date: Tue, 1 Nov 2011 22:24:35 +0100 Subject: [PATCH] c2arg2 --- include/psyc.h | 1 + include/psyc/packet.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/psyc.h b/include/psyc.h index b980a3d..4bcf520 100644 --- a/include/psyc.h +++ b/include/psyc.h @@ -24,6 +24,7 @@ #define PSYC_C2STR(str) {sizeof(str)-1, str} #define PSYC_C2ARG(str) str, sizeof(str)-1 +#define PSYC_C2ARG2(str) sizeof(str)-1, str #define PSYC_S2ARG(str) (str).data, (str).length #define PSYC_S2ARG2(str) (str).length, (str).data diff --git a/include/psyc/packet.h b/include/psyc/packet.h index 9608c2c..b72b912 100644 --- a/include/psyc/packet.h +++ b/include/psyc/packet.h @@ -126,8 +126,8 @@ static inline PsycModifier psyc_modifier_new (char oper, char *name, size_t namelen, char *value, size_t valuelen, - PsycModifierFlag flag){ - + PsycModifierFlag flag) +{ PsycModifier m = {oper, {namelen, name}, {valuelen, value}, flag}; if (flag == PSYC_MODIFIER_CHECK_LENGTH) // find out if it needs a length