chiark / gitweb /
shared/util: fix off-by-one error in tag_to_udev_node
[elogind.git] / src / shared / macro.h
index 969329d152368127cd38e133dc4db6b50ae4334d..d4f92b60ec83ac37a88d932cf817d3d71413a308 100644 (file)
@@ -186,8 +186,6 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
 
 #define char_array_0(x) x[sizeof(x)-1] = 0;
 
-#define hasprefix(s, prefix) (memcmp(s, prefix, strlen(prefix)) == 0)
-
 #define IOVEC_SET_STRING(i, s)                  \
         do {                                    \
                 struct iovec *_i = &(i);        \
@@ -273,7 +271,7 @@ do {                                                                    \
   * the const magic to the type, otherwise the compiler warns about
   * signed/unsigned comparison, because the magic can be 32 bit unsigned.
  */
-#define F_TYPE_CMP(a, b) (a == (typeof(a)) b)
+#define F_TYPE_EQUAL(a, b) (a == (typeof(a)) b)
 
 
 /* Returns the number of chars needed to format variables of the