Re: GConf and bonobo-conf are now obsolete



On Tue, 31 Jul 2001, James Henstridge wrote:

> On 30 Jul 2001, Seth Nickell wrote:
> 
> [snip]
> > char foobar[512];
> ...
> > sprintf (&foobar, "%s%s%s%s\n", g_get_home_dir(), 	          ".foo/",
> > "bar/foo", "bar");
> 
> won't this result in a segfault? (or overwriting random memory).  &foobar
> is a (char **) -- you should just be passing in foobar.  With code like
> this, the user's preferences will get lost, which we don't want.

you didn't seriously attempt to parse that code, did you?
i gave up after i sensed a tiny bit of clashing with foo and
bar versus 1) application name, 2) setting name, 3) scoping,
4) value contents, 5) preferences name, 6) probably something
i already forgot about.

so i took it as foobar-ed joke instead ;)

PS: it'd probably improve code readability in Gtk+ if only foo, bar
    and capitalization combinations thereof would be allowed for widget
    names. or --- wouldn't it?

> 
> James.
> 

---
ciaoTJ


_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]