mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 12:02:04 -04:00
add ISC_MAGIC('a','b','c','d') to make specifying magic numbers a bit more
readable
This commit is contained in:
parent
1cf2ee1ef0
commit
86bf5e8c34
1 changed files with 4 additions and 0 deletions
|
|
@ -20,4 +20,8 @@
|
|||
|
||||
#define ISC_MAGIC_VALID(a,b) (((a) != NULL) && ((a)->magic == (b)))
|
||||
|
||||
#define ISC_MAGIC(a, b, c, d) ((unsigned int)(a) << 24 \
|
||||
| (unsigned int)(b) << 16 \
|
||||
| (unsigned int)(c) << 8 | (d))
|
||||
|
||||
#endif /* ISC_MAGIC_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue