Name: streq implementation Author: Rusty Russell Status: Trivial I can't believe that after all these years I still make the "sense 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