]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
ptserver: Remove redundant braces
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:24:23 +0000 (19:24 +0100)
committerStephan Wiesand <stephan.wiesand@desy.de>
Wed, 29 Jan 2014 17:02:11 +0000 (09:02 -0800)
Doing if ((a==b)) is unecessary. It's also potentially dangerous, as
that's the syntax required to do assignment within an if statement.
clang now issues warnings (errors in -Werror mode) when it encounters
these.

Remove pointless braces from ptserver to make clang happy.

Reviewed-on: http://gerrit.openafs.org/7080
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 4d4e4dde7c0efcf238251b1ea1dc3933810062d0)

Change-Id: I4aad6766fc759895c8bffc16dde06169589f64ba
Reviewed-on: http://gerrit.openafs.org/10737
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/ptserver/pts.c

index a0ce821e506d531ce494bf0b6fbfd3d86340b50a..0035f5bacc8a7a49139d8d3946cefbaeb73df597 100644 (file)
@@ -508,7 +508,7 @@ GetNameOrId(struct cmd_syndesc *as, struct idlist *lids,
        afs_com_err(whoami, code, "so couldn't look up names");
     else {
        for (n = 0; n < tids.idlist_len; n++) {
-           if ((tids.idlist_val[n] == ANONYMOUSID)) {
+           if (tids.idlist_val[n] == ANONYMOUSID) {
                afs_com_err(whoami, PRNOENT, "so couldn't look up id for %s",
                        names.namelist_val[n]);
            } else