From: Uwe Hermann Date: Sat, 2 May 2015 19:18:36 +0000 (+0200) Subject: sp_list_ports(): Actually set list_ptr NULL as documented. X-Git-Tag: libserialport-0.1.1~41 X-Git-Url: http://sigrok.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=6392641545bb9ea1ff908f29da3184dde6a0139b;p=libserialport.git sp_list_ports(): Actually set list_ptr NULL as documented. --- diff --git a/serialport.c b/serialport.c index f2d2edc..e4f02fc 100644 --- a/serialport.c +++ b/serialport.c @@ -334,6 +334,8 @@ SP_API enum sp_return sp_list_ports(struct sp_port ***list_ptr) if (!list_ptr) RETURN_ERROR(SP_ERR_ARG, "Null result pointer"); + *list_ptr = NULL; + #ifdef NO_ENUMERATION RETURN_ERROR(SP_ERR_SUPP, "Enumeration not supported on this platform"); #else