projects
/
contrib
/
mraa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed0a1f6
)
i2c: clarify our usage of the result of the assignment
v0.2.0
author
Brendan Le Foll
<brendan.le.foll@intel.com>
Sun, 27 Apr 2014 22:15:54 +0000
(23:15 +0100)
committer
Brendan Le Foll
<brendan.le.foll@intel.com>
Sun, 27 Apr 2014 22:15:54 +0000
(23:15 +0100)
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/i2c/i2c.c
patch
|
blob
|
history
diff --git
a/src/i2c/i2c.c
b/src/i2c/i2c.c
index
db32484
..
10d2d92
100644
(file)
--- a/
src/i2c/i2c.c
+++ b/
src/i2c/i2c.c
@@
-67,7
+67,8
@@
int
maa_i2c_read_byte(i2c_t* dev)
{
int byte;
- if (byte = i2c_smbus_read_byte(dev->fh) < 0) {
+ byte = i2c_smbus_read_byte(dev->fh);
+ if (byte < 0) {
return -1;
}
return byte;