From 6aa2f56259e20828eeabc3eb007da779aabda3ff Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 18 Jun 2001 20:26:06 +0000 Subject: [PATCH] * dump.c (name_matches): Cleanup warning of assignments in conditionals. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13383 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/dbutil/ChangeLog | 5 +++++ src/kadmin/dbutil/dump.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/kadmin/dbutil/ChangeLog b/src/kadmin/dbutil/ChangeLog index d8b1e59bb..39f2e63d9 100644 --- a/src/kadmin/dbutil/ChangeLog +++ b/src/kadmin/dbutil/ChangeLog @@ -1,3 +1,8 @@ +2001-06-18 Ezra Peisach + + * dump.c (name_matches): Cleanup warning of assignments in + conditionals. + 2001-06-18 Ezra Peisach * dump.c: Include regex.h if exists and if HAVE_REGCOMP diff --git a/src/kadmin/dbutil/dump.c b/src/kadmin/dbutil/dump.c index 3bfc4ebaf..dfdfb7dee 100644 --- a/src/kadmin/dbutil/dump.c +++ b/src/kadmin/dbutil/dump.c @@ -356,9 +356,8 @@ name_matches(name, arglist) /* * Compile the regular expression. */ - if (match_error = regcomp(&match_exp, - arglist->names[i], - REG_EXTENDED)) { + match_error = regcomp(&match_exp, arglist->names[i], REG_EXTENDED); + if (match_error) { errmsg_size = regerror(match_error, &match_exp, match_errmsg, @@ -369,7 +368,8 @@ name_matches(name, arglist) /* * See if we have a match. */ - if (match_error = regexec(&match_exp, name, 1, &match_match, 0)) { + match_error = regexec(&match_exp, name, 1, &match_match, 0); + if (match_error) { if (match_error != REG_NOMATCH) { errmsg_size = regerror(match_error, &match_exp, -- 2.26.2