X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=examples%2Flist_ports.c;h=f183719538ad6ac20acb3e1d9e4353f445884b17;hb=refs%2Fheads%2Fmaster;hp=ab72aece171e7b806c9be2a1670ec2379ab3899d;hpb=ee12a01e52c19909b93ef4e23395a3374797d41e;p=libserialport.git diff --git a/examples/list_ports.c b/examples/list_ports.c index ab72aec..f183719 100644 --- a/examples/list_ports.c +++ b/examples/list_ports.c @@ -17,8 +17,7 @@ int main(int argc, char **argv) * pointer will be updated to refer to the array created. */ enum sp_return result = sp_list_ports(&port_list); - if (result != SP_OK) - { + if (result != SP_OK) { printf("sp_list_ports() failed!\n"); return -1; } @@ -26,8 +25,7 @@ int main(int argc, char **argv) /* Iterate through the ports. When port_list[i] is NULL * this indicates the end of the list. */ int i; - for (i = 0; port_list[i] != NULL; i++) - { + for (i = 0; port_list[i] != NULL; i++) { struct sp_port *port = port_list[i]; /* Get the name of the port. */