[PATCH] segfault in asclock-applet.
- From: Bj|rn Augustsson <d3august dtek chalmers se>
- To: gnome-devel-list gnome org
- Subject: [PATCH] segfault in asclock-applet.
- Date: Sun, 28 Mar 1999 06:23:08 +0200
Hi!
This is a simple patch for a segfault which happens when one opens the
properies menu in asclock from gnome-core 1.0.4.
/August.
--
Wrong on most accounts. const Foo *foo; and Foo const *foo; mean the same: foo
being a pointer to const Foo. const Foo const *foo; would mean the same but is
illegal (double const). You are confusing this with Foo * const foo; and const
Foo * const foo; respectively. -David Kastrup, comp.os.linux.development.system
--- gnome-core-1.0.4/applets/asclock/dialogs.c Fri Mar 26 17:30:55 1999
+++ /usr/src/dtek/pd/X11/gnome/gnome-core-1.0.4/applets/asclock/dialogs.c Sun Mar 28 06:21:20 1999
@@ -268,16 +268,17 @@
gtk_signal_connect( GTK_OBJECT(list), "select_row", GTK_SIGNAL_FUNC(theme_selected), my_asclock);
for (cpp= themes_directories; *cpp; cpp++)
{
-
- if((dfd = opendir(*cpp)) != NULL)
- while((dp = readdir(dfd)) != NULL)
+ if((dfd = opendir(*cpp)) != NULL) {
+ while((dp = readdir(dfd)) != NULL) {
if ( dp->d_name[0]!='.' ) {
gchar *elems[2] = { filename, NULL };
strcpy(filename, *cpp);
strcat(filename, dp->d_name);
gtk_clist_append(GTK_CLIST(list), elems );
+ }
+ }
+ closedir(dfd);
}
- closedir(dfd);
}
/* show ampm toggle button */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]