aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-11-06 10:32:40 -0300
committerJorge Arellano Cid <jcid@dillo.org>2009-11-06 10:32:40 -0300
commit7d6bb0839a0a5fc7c0d122b4e243a93f8e258279 (patch)
tree89207d8608f0d5df39d4e6bbecd239f08a99cadd
parent8f06733c8a70ad1ed61dc2dce59f776c0ab6a9cc (diff)
Compiler happiness for old versions of gcc
-rw-r--r--dpip/dpip.c4
-rw-r--r--src/IO/dpi.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/dpip/dpip.c b/dpip/dpip.c
index cf92c557..bfc543fb 100644
--- a/dpip/dpip.c
+++ b/dpip/dpip.c
@@ -263,7 +263,7 @@ Dsh *a_Dpip_dsh_new(int fd_in, int fd_out, int flush_sz)
*/
static int Dpip_dsh_write(Dsh *dsh, int nb, const char *Data, int DataSize)
{
- int req_mode, old_flags, st, ret = -3, sent = 0;
+ int req_mode, old_flags = 0, st, ret = -3, sent = 0;
req_mode = (nb) ? DPIP_NONBLOCK : 0;
if ((dsh->mode & DPIP_NONBLOCK) != req_mode) {
@@ -377,7 +377,7 @@ int a_Dpip_dsh_write_str(Dsh *dsh, int flush, const char *str)
static void Dpip_dsh_read(Dsh *dsh, int blocking)
{
char buf[RBUF_SZ];
- int req_mode, old_flags, st, ret = -3, nb = !blocking;
+ int req_mode, old_flags = 0, st, ret = -3, nb = !blocking;
dReturn_if (dsh->status == DPIP_ERROR || dsh->status == DPIP_EOF);
diff --git a/src/IO/dpi.c b/src/IO/dpi.c
index a5e873bd..10fdaf69 100644
--- a/src/IO/dpi.c
+++ b/src/IO/dpi.c
@@ -530,13 +530,13 @@ static int Dpi_blocking_start_dpid(void)
*/
int Dpi_get_server_port(const char *server_name)
{
- int sock_fd, dpi_port;
- int dpid_port, ret = -1, ok = 0;
+ int sock_fd, dpi_port = -1;
+ int dpid_port, ok = 0;
struct sockaddr_in sin;
char *cmd, *request, *rply = NULL, *port_str;
socklen_t sin_sz;
- dReturn_val_if_fail (server_name != NULL, ret);
+ dReturn_val_if_fail (server_name != NULL, dpi_port);
_MSG("Dpi_get_server_port:: server_name = [%s]\n", server_name);
/* Read dpid's port from saved file */