gdbserver/linux-low.cc: Fix a typo in ternary operator
authorKhem Raj <raj.khem@gmail.com>
Thu, 23 Feb 2023 00:28:22 +0000 (16:28 -0800)
committerTom Tromey <tromey@adacore.com>
Fri, 24 Feb 2023 19:09:05 +0000 (12:09 -0700)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
gdbserver/linux-low.cc

index 4328fedcbeae07f738b97309e774e6e90c3c0f88..dec1944d45ff74b84ac871c4169f4eadc026be7e 100644 (file)
@@ -5390,7 +5390,7 @@ proc_xfer_memory (CORE_ADDR memaddr, unsigned char *readbuf,
       if (lseek (fd, memaddr, SEEK_SET) != -1)
        bytes = (readbuf != nullptr
                 ? read (fd, readbuf, len)
-                ? write (fd, writebuf, len));
+                : write (fd, writebuf, len));
 #endif
 
       if (bytes < 0)