Re: debugging the gtk fe
On Thu, Jul 28, 2005 at 05:31:39PM +0200, fiandro@tiscali.it wrote:
> As i told you before i'm not very good at debugging code, but from your message
> i've seen the problem is related to argc and argv pointers: they are hand-created
> at line 1370 of gtk.c this way
>
> /* FIXME: This can surely be done in a better way */
> (char**) name = malloc(2 * sizeof(char*));
> (char*) name[0] = malloc(8 * sizeof(char));
> name[0] = "debconf";
> name[1] = NULL;
That's awful code, and lots of it is redundant (for instance, it
allocates some memory and then immediately throw it away by assigning a
string literal to it, and string literals are const anyway so should
never be assigned to plain char * variables). I hope there isn't too
much more code like this lying around gtk.c!
I've made it a bit more normal in the trunk.
--
Colin Watson [cjwatson@debian.org]
Reply to: