[PATCH] Module rewrite 6/20: streq

Rusty Russell (rusty@rustcorp.com.au)
Wed, 25 Sep 2002 13:01:03 +1000


Name: streq implementation
Author: Rusty Russell
Status: Trivial
Depends: Misc/strcspn.patch.gz

D: I can't believe that after all these years I still make the "sense
D: of strcmp" mistake. So it's time to reintroduce my favorite macro.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .24879-linux-2.5.38/include/linux/string.h .24879-linux-2.5.38.updated/include/linux/string.h
--- .24879-linux-2.5.38/include/linux/string.h 2002-09-24 21:23:55.000000000 +1000
+++ .24879-linux-2.5.38.updated/include/linux/string.h 2002-09-24 21:24:33.000000000 +1000
@@ -16,6 +16,7 @@ extern char * strpbrk(const char *,const
extern char * strsep(char **,const char *);
extern __kernel_size_t strspn(const char *,const char *);
extern __kernel_size_t strcspn(const char *,const char *);
+#define streq(a,b) (strcmp((a),(b)) == 0)

/*
* Include machine specific inline routines

--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/