Use enums for error codes

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
TheJackiMonster 2023-09-08 01:12:31 +02:00
parent 791413179c
commit 5bcf6efe57
No known key found for this signature in database
GPG key ID: D850A5F772E880F9
7 changed files with 127 additions and 78 deletions

View file

@ -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;
}
}

View file

@ -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;
}
}