Use enums for error codes
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
parent
791413179c
commit
5bcf6efe57
7 changed files with 127 additions and 78 deletions
|
@ -56,7 +56,7 @@ int main(int argc, const char** argv) {
|
|||
device3_clear(dev3);
|
||||
|
||||
while (dev3) {
|
||||
if (device3_read(dev3, -1) < 0) {
|
||||
if (device3_read(dev3, -1) != DEVICE3_ERROR_NO_ERROR) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ int main(int argc, const char** argv) {
|
|||
device4_clear(dev4);
|
||||
|
||||
while (dev4) {
|
||||
if (device4_read(dev4, 1000) < 0) {
|
||||
if (device4_read(dev4, 1000) != DEVICE4_ERROR_NO_ERROR) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue