Clarify sp_list_ports() code.
commit8d12e620f255ef44da8d0c7ee810a7b3bcaf8807
authorMartin Ling <martin-git@earth.li>
Tue, 31 Mar 2015 23:24:27 +0000 (1 00:24 +0100)
committerUwe Hermann <uwe@hermann-uwe.de>
Fri, 3 Apr 2015 15:46:26 +0000 (3 17:46 +0200)
treeded596a526a024329df3afb1327d11ffc1a978e4
parent34442106efcf0621f5bc2f77aab771407d9ae5c2
Clarify sp_list_ports() code.

This also fixes the following scan-build warning:

  serialport.c:335:15: warning: Result of 'malloc' is converted to a
  pointer of type 'struct sp_port *', which is incompatible with sizeof
  operand type 'struct sp_port **'
          if (!(list = malloc(sizeof(struct sp_port **))))
                       ^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
serialport.c