Hi!
> +#include <sys/socket.h>
> #include <stdio.h>
> #include <string.h>
> #include <stdlib.h>
> @@ -289,6 +290,40 @@ void apicmd_kvercmp2(int argc, char *argv[])
> exit(exit_value);
> }
>
> +struct param_pair {
> + char *cmd;
> + int value;
> +};
> +
> +unsigned short apicmd_get_unused_port(int argc, char *argv[])
> +{
> + if (argc != 3)
> + goto err;
> +
> + const struct param_pair params[][3] = {
> + {{ "ipv4", AF_INET }, { "ipv6", AF_INET6 }, { 0, 0 }},
^
I would rather see NULL here.
Because I'm not 100% sure that the automatic cast will do the right
thing on all implementations.
Otherwise it's fine.
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list