On Mon, 7 Jan 2008 13:18:07 +0530 (IST)
[EMAIL PROTECTED] wrote:

[Stuff snipped]

Some comments on your code, aside from the basic conceptual problems:


>       pdata = (ProgressData *)g_malloc0(sizeof(ProgressData));

Useless cast, and useless parentheses around sizeof's operand.

>       txt_start_count = (gchar *) g_malloc0(50*sizeof(gchar));

Same here.

>       txt_start_count = (gchar
> *)gtk_entry_get_text(GTK_ENTRY(wdgt_start_count));

Useless (possibly dangerous) cast, and you're leaking the memory g_malloced() 
above.

 txt_end_count =
> (gchar *)gtk_entry_get_text(GTK_ENTRY(wdgt_end_count));

Same here.

> 
>       start_count = atoi(txt_start_count);
>       end_count = atoi(txt_end_count);

Don't use atoi(). Use strtol() and do error checking.

--D.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to