chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c226fa4
)
util: Adding a strneq, to represent (!strncmp(a, b, n))
author
Fabiano Fidencio
<fidencio@profusion.mobi>
Thu, 7 Oct 2010 11:24:39 +0000
(
04:24
-0700)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 7 Oct 2010 17:22:11 +0000
(19:22 +0200)
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
patch
|
blob
|
history
diff --git
a/src/util.h
b/src/util.h
index f21aecf256e7219a533648da732c62fe7572945a..618e7cf9a82426d649bc39022473b704bf4a765a 100644
(file)
--- 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);