projects
/
petitboot
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #11 from open-power/coverity
[petitboot]
/
lib
/
util
/
util.h
diff --git
a/lib/util/util.h
b/lib/util/util.h
index 8c08dc52eafd7e812949c78fba01e7f8b051a674..39966d0b7b0a2586b7ce8d857871c5379d4ecb31 100644
(file)
--- a/
lib/util/util.h
+++ b/
lib/util/util.h
@@
-18,6
+18,8
@@
#ifndef UTIL_H
#define UTIL_H
#ifndef UTIL_H
#define UTIL_H
+#include <stdint.h>
+
#ifndef container_of
#define container_of(_ptr, _type, _member) ({ \
const typeof( ((_type *)0)->_member ) *__mptr = (_ptr); \
#ifndef container_of
#define container_of(_ptr, _type, _member) ({ \
const typeof( ((_type *)0)->_member ) *__mptr = (_ptr); \
@@
-44,5
+46,10
@@
_max_a > _max_b ? _max_a : _max_b; \
})
_max_a > _max_b ? _max_a : _max_b; \
})
+#define build_assert(x) \
+ do { (void)sizeof(char[(x)?1:-1]); } while (0)
+
+void mac_str(uint8_t *mac, unsigned int maclen, char *buf, unsigned int buflen);
+
#endif /* UTIL_H */
#endif /* UTIL_H */