diff options
author | Dan Cross <cross@gajendra.net> | 2017-04-20 21:35:23 +0000 |
---|---|---|
committer | Gleydson Soares <gsoares@gmail.com> | 2017-05-05 20:04:17 +0000 |
commit | c976381d67e1c1ff16f155cbcc6c905245d0520f (patch) | |
tree | 933203aaf8b2ca9ad158b327eeee1036dee68cb8 | |
parent | 9e52ea8a29db42f37188fd8fa35d641724c3d015 (diff) | |
download | plan9port-c976381d67e1c1ff16f155cbcc6c905245d0520f.tar.gz plan9port-c976381d67e1c1ff16f155cbcc6c905245d0520f.tar.bz2 plan9port-c976381d67e1c1ff16f155cbcc6c905245d0520f.zip |
factotum: Fix an operator precedence bug in the secstore code
`==` is higher precedence than `&`. Parenthesize.
Change-Id: I2c7ee588fea0d8a66e1c8424f26630015388d61a
Signed-off-by: Dan Cross <cross@gajendra.net>
Reviewed-on: https://plan9port-review.googlesource.com/2860
Reviewed-by: Gleydson Soares <gsoares@gmail.com>
-rw-r--r-- | src/cmd/auth/factotum/secstore.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/auth/factotum/secstore.c b/src/cmd/auth/factotum/secstore.c index 2babf4d8..c17c3cf2 100644 --- a/src/cmd/auth/factotum/secstore.c +++ b/src/cmd/auth/factotum/secstore.c @@ -181,7 +181,7 @@ SC_read(SConn *conn, uchar *buf, int n) uchar count[2], digest[SHA1dlen]; int len, nr; - if(read(ss->fd, count, 2) != 2 || count[0]&0x80 == 0){ + if(read(ss->fd, count, 2) != 2 || (count[0]&0x80) == 0){ werrstr("!SC_read invalid count"); return -1; } |