ptserver: Remove redundant braces
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:24:23 +0000 (19:24 +0100)
committerDerrick Brashear <shadow@dementix.org>
Sun, 8 Apr 2012 01:28:06 +0000 (18:28 -0700)
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.

Change-Id: I1bf1698b1d12f8228e0456d3d2dff4439879cfba
Reviewed-on: http://gerrit.openafs.org/7080
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>

src/ptserver/pts.c

index 1d69a0e..276ff7b 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