[binutils-gdb] gprofng: fix -Wduplicated-cond warning

Vladimir Mezentsev vmezents@sourceware.org
Thu Sep 22 02:00:50 GMT 2022


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=90eca7111355e4c6683c1ab10fd07107ea10f6d1

commit 90eca7111355e4c6683c1ab10fd07107ea10f6d1
Author: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Date:   Wed Sep 21 13:01:06 2022 -0700

    gprofng: fix -Wduplicated-cond warning
    
    gprofng/ChangeLog
    2022-09-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
    
            * src/collctrl.cc: Fix -Wduplicated-cond warning.

Diff:
---
 gprofng/src/collctrl.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gprofng/src/collctrl.cc b/gprofng/src/collctrl.cc
index 48c65ff6f24..04e3e57bca5 100644
--- a/gprofng/src/collctrl.cc
+++ b/gprofng/src/collctrl.cc
@@ -760,7 +760,7 @@ Coll_Ctrl::get_collect_args ()
       *p++ = strdup ("-s");
       if (synctrace_thresh < 0)
 	*p++ = strdup ("calibrate");
-      else if (synctrace_thresh < 0)
+      else if (synctrace_thresh == 0)
 	*p++ = strdup ("all");
       else
 	*p++ = dbe_sprintf ("%d", synctrace_thresh);


More information about the Binutils-cvs mailing list