Fixed result check for mbus_connect

This commit is contained in:
Stefan Wahren 2012-07-13 23:01:29 +02:00
parent 5d724d9473
commit c86ed10af7
2 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ main(int argc, char **argv)
return 1; return 1;
} }
if (!mbus_connect(handle)) if (mbus_connect(handle) == -1)
{ {
printf("Failed to setup connection to M-bus gateway\n"); printf("Failed to setup connection to M-bus gateway\n");
return 1; return 1;

View File

@ -108,7 +108,7 @@ main(int argc, char **argv)
return 1; return 1;
} }
if (!mbus_connect(handle)) if (mbus_connect(handle) == -1)
{ {
printf("Failed to setup connection to M-bus gateway\n"); printf("Failed to setup connection to M-bus gateway\n");
return 1; return 1;