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