X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=linux.c;fp=linux.c;h=f7dc8fda7febfc97ec21b0934750d672aad773fc;hb=0c3f38b81b8968d78806a7a41ed351a870882b5e;hp=9016489fb16f95afcedc2db0c9d8d2c8feb5a1f3;hpb=3fcdc9f7d5aa9bbae3041d80ab50b83e9bef182d;p=libserialport.git diff --git a/linux.c b/linux.c index 9016489..f7dc8fd 100644 --- a/linux.c +++ b/linux.c @@ -236,7 +236,7 @@ SP_PRIV enum sp_return list_ports(struct sp_port ***list) } DEBUG_FMT("Found port %s", name); *list = list_append(*list, name); - if (!list) { + if (!*list) { SET_ERROR(ret, SP_ERR_MEM, "List append failed"); break; }