At Thu, 14 Feb 2013 23:03:57 +0800, harryxi...@gmail.com wrote: > > static const struct subcommand *find_subcmd(const char *cmd, const char > *subcmd) > @@ -322,7 +326,11 @@ int main(int argc, char **argv) > char *p; > const struct sd_option *sd_opts; > > - init_commands(&commands); > + ret = init_commands(&commands); > + if (ret < 0) { > + fprintf(stderr, "Failed to init commands.\n"); > + exit(EXIT_SYSFAIL); > + }
Since the program exits either way, how about using xmalloc as we do in other places? Thanks for your contribution. Kazutaka -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog