protoverse

A metaverse protocol
git clone git://jb55.com/protoverse
Log | Files | Refs | README | LICENSE

util.h (265B)


      1 
      2 #ifndef PROTOVERSE_UTIL_H
      3 #define PROTOVERSE_UTIL_H
      4 
      5 #include <string.h>
      6 
      7 static inline int memeq(void *buf, int buf_len, void *buf2, int buf2_len)
      8 {
      9 	if (buf_len != buf2_len)
     10 		return 0;
     11 
     12 	return memcmp(buf, buf2, buf_len) == 0;
     13 }
     14 
     15 #endif /* PROTOVERSE_UTIL_H */