aklog: those pesky assignments in conditionals
authorBenjamin Kaduk <kaduk@mit.edu>
Thu, 6 Feb 2014 22:34:21 +0000 (17:34 -0500)
committerD Brashear <shadow@your-file-system.com>
Tue, 25 Mar 2014 16:55:19 +0000 (09:55 -0700)
This one should actually be an assignment, and the compiler warning
for having two sets of parentheses is helpful.

Found by clang on FreeBSD 10.0.

Change-Id: Ic906cbdc50a20bcd0b91555581b60c518da2bc81
Reviewed-on: http://gerrit.openafs.org/10823
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>

src/aklog/aklog.c

index 77d9548..f397bf5 100644 (file)
@@ -1856,7 +1856,7 @@ get_credv5_akimpersonate(krb5_context context,
         krb5_keytab_entry new[1];
         int best = -1;
         memset(new, 0, sizeof *new);
-        if ((code == krb5_kt_start_seq_get(context, kt, cursor))) {
+        if ((code = krb5_kt_start_seq_get(context, kt, cursor))) {
             afs_com_err(progname, code, "while starting keytab scan");
             goto cleanup;
         }