projects
/
coreboot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Some changes required to get yabel working on v2 (and they generally make
[coreboot.git]
/
src
/
include
/
string.h
diff --git
a/src/include/string.h
b/src/include/string.h
index 25e741e810156f5f4f2198b2c57661ee88cf0f57..d82b3ac1c4abb6b418f09a1a95b3352c905738ac 100644
(file)
--- a/
src/include/string.h
+++ b/
src/include/string.h
@@
-81,6
+81,18
@@
static inline int strcmp(const char *s1, const char *s2)
return r;
}
+static inline int strncmp(const char *s1, const char *s2, int maxlen)
+{
+ int i;
+
+ for (i = 0; i < maxlen; i++) {
+ if (s1[i] != s2[i])
+ return s1[i] - s2[i];
+ }
+
+ return 0;
+}
+
static inline int isspace(int c)
{
switch (c) {