summaryrefslogtreecommitdiffstats
path: root/serprog.c
diff options
context:
space:
mode:
Diffstat (limited to 'serprog.c')
-rw-r--r--serprog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/serprog.c b/serprog.c
index edc5a7b..98c839e 100644
--- a/serprog.c
+++ b/serprog.c
@@ -372,7 +372,7 @@ int serprog_init(void)
}
if (strlen(device)) {
sp_fd = sp_openserport(device, atoi(baudport));
- if (sp_fd < 0) {
+ if (sp_fd == SER_INV_FD) {
free(device);
return 1;
}
OpenPOWER on IntegriCloud