From 0d34b4519cbdf65b4bbaa2eff6894d27a6ffaeba Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Mon, 4 Nov 2013 00:00:05 +0000 Subject: [PATCH] Fix enumeration on OS X. --- serialport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serialport.c b/serialport.c index b47ddd9..7022a9d 100644 --- a/serialport.c +++ b/serialport.c @@ -205,7 +205,7 @@ out_done: CFDictionarySetValue(classes, CFSTR(kIOSerialBSDTypeKey), CFSTR(kIOSerialBSDAllTypes)); - if (!(IOServiceGetMatchingServices(master, classes, &iter))) + if (IOServiceGetMatchingServices(master, classes, &iter) != KERN_SUCCESS) { ret = SP_ERR_FAIL; goto out_done;