From: Steve Chamberlain Date: Sat, 30 Jul 1994 05:04:03 +0000 (+0000) Subject: * remote.c (read_frame): Split readchar/checksum calculation into X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=205fc02b50787b862f3fa66e0c1a89841876d676;p=binutils-gdb.git * remote.c (read_frame): Split readchar/checksum calculation into two parts since evaluation order is undefined. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1c3a954a4de..51126908972 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Fri Jul 29 21:56:23 1994 Steve Chamberlain (sac@jonny.cygnus.com) + + * remote.c (read_frame): Split readchar/checksum calculation into + two parts since evaluation order is undefined. + Fri Jul 29 13:46:08 1994 Fred Fish (fnf@cygnus.com) From Kevin A. Buettner (kev@cujo.geg.mot.com). diff --git a/gdb/remote.c b/gdb/remote.c index d5b677e4eea..828b06215b7 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;