tfactotum: Fix an operator precedence bug in the secstore code - plan9port - [f… | |
git clone git://src.adamsgaard.dk/plan9port | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit c976381d67e1c1ff16f155cbcc6c905245d0520f | |
parent 9e52ea8a29db42f37188fd8fa35d641724c3d015 | |
Author: Dan Cross <[email protected]> | |
Date: Thu, 20 Apr 2017 21:35:23 +0000 | |
factotum: Fix an operator precedence bug in the secstore code | |
`==` is higher precedence than `&`. Parenthesize. | |
Change-Id: I2c7ee588fea0d8a66e1c8424f26630015388d61a | |
Signed-off-by: Dan Cross <[email protected]> | |
Reviewed-on: https://plan9port-review.googlesource.com/2860 | |
Reviewed-by: Gleydson Soares <[email protected]> | |
Diffstat: | |
M src/cmd/auth/factotum/secstore.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/src/cmd/auth/factotum/secstore.c b/src/cmd/auth/factotum/secstore.c | |
t@@ -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; | |
} |