From 3846aeeba29a31628ec7a8b34884916073585e06 Mon Sep 17 00:00:00 2001 From: Fabiano Fidencio Date: Thu, 7 Oct 2010 04:24:39 -0700 Subject: [PATCH] util: Adding a strneq, to represent (!strncmp(a, b, n)) As we have streq to repesent (strcmp(a, b) == 0),I'm adding strneq to represent (strncmp(a, b, n) == 0), that will be used in umount.c (at least). --- src/util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.h b/src/util.h index f21aecf25..618e7cf9a 100644 --- a/src/util.h +++ b/src/util.h @@ -82,6 +82,7 @@ usec_t timeval_load(const struct timeval *tv); struct timeval *timeval_store(struct timeval *tv, usec_t u); #define streq(a,b) (strcmp((a),(b)) == 0) +#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0) bool streq_ptr(const char *a, const char *b); -- 2.30.2