diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-09-06 13:07:37 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-09-06 13:07:37 +0000 |
commit | eea1c4cfcbf4442d928bed4692670ac8e1c010ea (patch) | |
tree | aa7dc86ee0c180211b0257da56ccf1b75d2f4680 /usr.bin/m4/stdd.h | |
parent | 22d9f028a4f5eb15c54e4af1c8d8d509ddbac425 (diff) |
Optimize STREQ/STREQN some more
Diffstat (limited to 'usr.bin/m4/stdd.h')
-rw-r--r-- | usr.bin/m4/stdd.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/m4/stdd.h b/usr.bin/m4/stdd.h index 57993f703bb..ae902b4f154 100644 --- a/usr.bin/m4/stdd.h +++ b/usr.bin/m4/stdd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdd.h,v 1.2 1996/06/26 05:36:16 deraadt Exp $ */ +/* $OpenBSD: stdd.h,v 1.3 1999/09/06 13:07:36 espie Exp $ */ /* $NetBSD: stdd.h,v 1.2 1995/09/28 05:37:50 tls Exp $ */ /*- @@ -52,8 +52,8 @@ * STREQ is an optimised strcmp(a,b)==0 * STREQN is an optimised strncmp(a,b,n)==0; assumes n > 0 */ -#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0) -#define STREQN(a, b, n) ((a)[0] == (b)[0] && strncmp(a, b, n) == 0) +#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp((a)+1, (b)+1) == 0) +#define STREQN(a, b, n) ((a)[0] == (b)[0] && strncmp((a)+1, (b)+1, (n)-1) == 0) #define YES 1 #define NO 0 |