This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Remove unused gdb_timer global
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Mon, 3 May 2010 14:00:15 -0700 (PDT)
- Subject: [commit] Remove unused gdb_timer global
Hi.
fyi, I've checked this in.
2010-05-03 Doug Evans <dje@google.com>
* event-loop.c (gdb_timer): Delete unused global.
(create_timer): Update.
Index: event-loop.c
===================================================================
RCS file: /cvs/src/src/gdb/event-loop.c,v
retrieving revision 1.42
diff -u -p -r1.42 event-loop.c
--- event-loop.c 19 Jan 2010 09:39:11 -0000 1.42
+++ event-loop.c 3 May 2010 20:56:07 -0000
@@ -218,8 +218,7 @@ struct gdb_timer
struct gdb_timer *next;
timer_handler_func *proc; /* Function to call to do the work */
gdb_client_data client_data; /* Argument to async_handler_func */
- }
-gdb_timer;
+ };
/* List of currently active timers. It is sorted in order of
increasing timers. */
@@ -1188,7 +1187,7 @@ create_timer (int milliseconds, timer_ha
gettimeofday (&time_now, NULL);
- timer_ptr = (struct gdb_timer *) xmalloc (sizeof (gdb_timer));
+ timer_ptr = (struct gdb_timer *) xmalloc (sizeof (*timer_ptr));
timer_ptr->when.tv_sec = time_now.tv_sec + delta.tv_sec;
timer_ptr->when.tv_usec = time_now.tv_usec + delta.tv_usec;
/* carry? */