1
0
mirror of git://sigrok.org/libserialport synced 2023-08-10 21:13:24 +03:00

Fix use of variable length local array in await_events example.

This prevented building with MSVC.
This commit is contained in:
Martin Ling 2020-01-24 06:24:59 +00:00 committed by Uwe Hermann
parent d6412d2801
commit d8c4d388e8

View File

@ -20,7 +20,9 @@ int main(int argc, char **argv)
char **port_names = argv + 1; char **port_names = argv + 1;
/* The ports we will use. */ /* The ports we will use. */
struct sp_port *ports[num_ports]; struct sp_port **ports = malloc(num_ports * sizeof(struct sp_port *));
if (!ports)
abort();
/* The set of events we will wait for. */ /* The set of events we will wait for. */
struct sp_event_set *event_set; struct sp_event_set *event_set;