Added prototype. Added cast to const void *' in calls to write' and
1998-08-25 Martin Baulig <martin@home-of-linux.org> * daemon.h (handle_parent_connection): Added prototype. * write.c, io.c: Added cast to `const void *' in calls to `write' and `send' to avoid compiler warnings. * gnuserv.c (handle_signal): Declared static. (main): Casting return value of `getuid' to `int' in debugging statement. * ChangeLog: New file.
This commit is contained in:
committed by
Martin Baulig
parent
9049a19434
commit
f66f7fde8c
@@ -41,18 +41,18 @@ glibtop_send_version (glibtop *server, int fd)
|
||||
fprintf (stderr, "SERVER ID: |%s|\n", buffer);
|
||||
|
||||
if (fd == 0) {
|
||||
if (write (1, &size, sizeof (size)) < 0)
|
||||
if (write (1, (const void *) &size, sizeof (size)) < 0)
|
||||
glibtop_warn_io_r (server, "write");
|
||||
} else {
|
||||
if (send (fd, &size, sizeof (size), 0) < 0)
|
||||
if (send (fd, (const void *) &size, sizeof (size), 0) < 0)
|
||||
glibtop_warn_io_r (server, "send");
|
||||
}
|
||||
|
||||
if (fd == 0) {
|
||||
if (write (1, buffer, size) < 0)
|
||||
if (write (1, (const void *) buffer, size) < 0)
|
||||
glibtop_warn_io_r (server, "write");
|
||||
} else {
|
||||
if (send (fd, buffer, size, 0) < 0)
|
||||
if (send (fd, (const void *) buffer, size, 0) < 0)
|
||||
glibtop_warn_io_r (server, "send");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user