nfs_normalize_path: fix using the results of assignments in while loops
authorArne Redlich <arne.redlich@googlemail.com>
Thu, 13 Feb 2014 21:36:54 +0000 (22:36 +0100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 20 Feb 2014 02:41:34 +0000 (18:41 -0800)
commit4b1ae88abbb0554cfbc2cc27320e7c32838fb2bd
tree935feb2e724ae746bdb51efaf37163a932e1316c
parenta81c5ea1d221c9390d25b0d06cd7c67eba300fa8
nfs_normalize_path: fix using the results of assignments in while loops

Spotted by clang:
 ../../libnfs.git/lib/libnfs.c:1002:13: warning: using the result of an assignment as a condition without parentheses
       [-Wparentheses]
         while (str = strstr(path, "//")) {
                ~~~~^~~~~~~~~~~~~~~~~~~~
 ../../libnfs.git/lib/libnfs.c:1002:13: note: place parentheses around the assignment to silence this warning
         while (str = strstr(path, "//")) {
                    ^
                (                       )
 ../../libnfs.git/lib/libnfs.c:1002:13: note: use '==' to turn this assignment into an equality comparison
         while (str = strstr(path, "//")) {
                    ^
                    ==

Make the intent clear by adding extra parentheses, and also
remove trailing whitespace from libnfs.c while at it.

Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
lib/libnfs.c