summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabiano Fidencio <fidencio@profusion.mobi>2010-10-07 04:24:39 -0700
committerLennart Poettering <lennart@poettering.net>2010-10-07 19:22:11 +0200
commit3846aeeba29a31628ec7a8b34884916073585e06 (patch)
tree702a1c401520cadc11aa72c626fb2310475dd7fa /src
parentc226fa4196aacf44a2aa9ebbd222161f79c2f070 (diff)
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).
Diffstat (limited to 'src')
-rw-r--r--src/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index f21aecf256..618e7cf9a8 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);