[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Guarantee that an output module is loaded at most once.
From: |
William Hubbs |
Subject: |
[PATCH] Guarantee that an output module is loaded at most once. |
Date: |
Tue, 15 Feb 2011 16:12:57 -0600 |
Hi Chris,
On Tue, Feb 15, 2011 at 08:38:09PM +0000, Christopher Brannon wrote:
> +gboolean
> +module_already_requested(char *module_name, char *module_cmd,
> + char *module_cfgfile)
Did indent(1) set this up with the return type on a line by itself? That
is not typical of our coding style.
> +{
> + GList *lp;
> +
> + for (lp = requested_modules; lp != NULL; lp = lp->next) {
> + char **params = lp->data;
> + if (!strcmp(module_name, params[0]) ||
> + (!strcmp(module_cmd, params[1]) &&
> + !strcmp(module_cfgfile, params[2])))
strcmp() isn't a boolean function, so I think it makes more sense to
check for a specific return value instead of treating the return value
like a boolean.
Thanks,
William
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL:
<http://lists.freebsoft.org/pipermail/speechd/attachments/20110215/8d421cdc/attachment.pgp>