Re: [evolution-patches] Fix for bug#306986
- From: "Veerapuram Varadhan" <vvaradhan novell com>
- To: "S Rohini" <SRohini novell com>
- Cc: evolution-patches gnome org
- Subject: Re: [evolution-patches] Fix for bug#306986
- Date: Mon, 19 Dec 2005 03:06:24 -0700
On Mon, 2005-12-19 at 08:57 +0000, Rohini wrote:
>
> +static void
> +html_engine_strip_quote(gchar *word)
> +{
> + if(word[0]=='\'' && word[strlen(word)-1]=='\'') {
> + int i;
> +
> + for(i=1;i<strlen(word)-1;i++)
> + word[i-1]=word[i];
> + word[strlen(word)-2]='\0';
> + }
> +}
> +
I would prefer a variable to store strlen (word), that would save
two-function-calls.
Also, the function is optimistic about the parameter, IMO, a "NULL"
check on the parameter will be appreciated.
(I agree that the way the function is used in the patch, it will not get
a "NULL" pointer in its argument.)
V. Varadhan
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]