]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ss: fix warning about empty if()
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 28 Jun 2023 23:33:10 +0000 (16:33 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 28 Jun 2023 23:33:10 +0000 (16:33 -0700)
With all warnings enabled gcc wants brackets around the
empty if() clause. "Yes I really want an empty clause"

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
misc/ss.c

index de02fccb539bf156f8a23e3e6228b56ca11edb3e..e9d813596b91ac6475e494deb9412038034a4e32 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -627,8 +627,9 @@ static void user_ent_hash_build_task(char *path, int pid, int tid)
 
                        fp = fopen(stat, "r");
                        if (fp) {
-                               if (fscanf(fp, "%*d (%[^)])", task) < 1)
+                               if (fscanf(fp, "%*d (%[^)])", task) < 1) {
                                        ; /* ignore */
+                               }
                                fclose(fp);
                        }
                }