From: Martin Ling Date: Mon, 4 Nov 2013 00:00:05 +0000 (+0000) Subject: Fix enumeration on OS X. X-Git-Tag: libserialport-0.1.0~141 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0d34b4519cbdf65b4bbaa2eff6894d27a6ffaeba;p=libserialport.git Fix enumeration on OS X. --- 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;