From 4bbdae0afd2b6cb6fdfd163f6107708f8a76e62b Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Thu, 15 Aug 1996 21:12:10 +0000 Subject: [PATCH] * fcc_retrv.c (flags_match): Add parens to def'n of flags_match to make comparison correct. (== has higher precedence than &) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8941 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/file/ChangeLog | 5 +++++ src/lib/krb5/ccache/file/fcc_retrv.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/ccache/file/ChangeLog b/src/lib/krb5/ccache/file/ChangeLog index 1bb7a2ae8..8b568c178 100644 --- a/src/lib/krb5/ccache/file/ChangeLog +++ b/src/lib/krb5/ccache/file/ChangeLog @@ -1,3 +1,8 @@ +Thu Aug 15 16:46:00 1996 Tom Yu + + * fcc_retrv.c (flags_match): Add parens to def'n of flags_match to + make comparison correct. (== has higher precedence than &) + Wed Jun 12 01:04:27 1996 Theodore Ts'o * fcc-proto.h: Change use of PROTOTYPE to KRB5_PROTOTYPE. diff --git a/src/lib/krb5/ccache/file/fcc_retrv.c b/src/lib/krb5/ccache/file/fcc_retrv.c index bda1b8791..ab0db7c8e 100644 --- a/src/lib/krb5/ccache/file/fcc_retrv.c +++ b/src/lib/krb5/ccache/file/fcc_retrv.c @@ -31,7 +31,7 @@ #endif #define set(bits) (whichfields & bits) -#define flags_match(a,b) (a & b == a) +#define flags_match(a,b) (((a) & (b)) == (a)) #define times_match_exact(t1,t2) (memcmp((char *)(t1), (char *)(t2), sizeof(*(t1))) == 0) static krb5_boolean times_match PROTOTYPE((const krb5_ticket_times *, -- 2.26.2