X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=lib%2Fnotmuch-private.h;h=592cfb2b40d029aa19597b1a659efac436adb6ca;hb=d33dee5389e5d4a88c8504b1c94d2c9cb432fe52;hp=37ccbb315fab19c6e8c78ba98be2c6a7e39daf23;hpb=1d02dd64afe245a2b5a8461feeba975e61f0c233;p=notmuch diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 37ccbb31..592cfb2b 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -57,6 +57,9 @@ NOTMUCH_BEGIN_DECLS #define COMPILE_TIME_ASSERT(pred) ((void)sizeof(char[1 - 2*!(pred)])) +#define STRNCMP_LITERAL(var, literal) \ + strncmp ((var), (literal), sizeof (literal) - 1) + /* There's no point in continuing when we've detected that we've done * something wrong internally (as opposed to the user passing in a * bogus value).