Fixed wrong type which caused a core dump.

This commit is contained in:
Martin Baulig
1998-07-14 20:24:55 +00:00
parent 61f887fc67
commit f8bdfa9a43

View File

@@ -50,6 +50,9 @@ extern void handle_slave_command __P((glibtop_command *, glibtop_response *, con
#define _offset_union(p) ((char *) &resp->u.p - (char *) resp) #define _offset_union(p) ((char *) &resp->u.p - (char *) resp)
#define _offset_data(p) _offset_union (data.p) #define _offset_data(p) _offset_union (data.p)
static void do_output __P((int, glibtop_response *, off_t, size_t, const void *));
static int do_read __P((int, void *, size_t));
static void static void
do_output (int s, glibtop_response *resp, off_t offset, do_output (int s, glibtop_response *resp, off_t offset,
size_t data_size, const void *data) size_t data_size, const void *data)
@@ -262,7 +265,7 @@ handle_child_connection (int s)
char parameter [BUFSIZ]; char parameter [BUFSIZ];
void *ptr; void *ptr;
while (do_read (s, &cmnd, sizeof (glibtop_command))) { while (do_read (s, cmnd, sizeof (glibtop_command))) {
#ifdef CHILD_DEBUG #ifdef CHILD_DEBUG
fprintf (stderr, "Child (%d - %d) received command " fprintf (stderr, "Child (%d - %d) received command "
"%d from client.\n", getpid (), s, cmnd->command); "%d from client.\n", getpid (), s, cmnd->command);