From 205fc02b50787b862f3fa66e0c1a89841876d676 Mon Sep 17 00:00:00 2001 From: Steve Chamberlain Date: Sat, 30 Jul 1994 05:04:03 +0000 Subject: * remote.c (read_frame): Split readchar/checksum calculation into two parts since evaluation order is undefined. --- gdb/remote.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/remote.c') 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; -- cgit v1.1