aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1994-07-30 05:04:03 +0000
committerSteve Chamberlain <sac@cygnus>1994-07-30 05:04:03 +0000
commit205fc02b50787b862f3fa66e0c1a89841876d676 (patch)
tree704b5513e5eee99bae3f8fc1eb26519edf8bf0cf /gdb/remote.c
parent0c18c7370b1be430c5154cb29a72d19bc6d27f8d (diff)
downloadgdb-205fc02b50787b862f3fa66e0c1a89841876d676.zip
gdb-205fc02b50787b862f3fa66e0c1a89841876d676.tar.gz
gdb-205fc02b50787b862f3fa66e0c1a89841876d676.tar.bz2
* remote.c (read_frame): Split readchar/checksum calculation into
two parts since evaluation order is undefined.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index d5b677e..828b062 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1231,8 +1231,8 @@ read_frame (buf)
*bp = '\000';
- pktcsum = fromhex (readchar (remote_timeout)) << 4
- | fromhex (readchar (remote_timeout));
+ pktcsum = fromhex (readchar (remote_timeout)) << 4;
+ pktcsum |= fromhex (readchar (remote_timeout));
if (csum == pktcsum)
return 1;