coverity: dead code

ulab-next-nosound
Laxmikant Rashinkar 10 years ago
parent 56e43c4a38
commit 0915d33d70

@ -276,10 +276,7 @@ sign_key(char *e_data, int e_len, char *n_data, int n_len,
g_free(key);
g_free(md5_final);
}
else
{
g_writeln("problem");
}
return 0;
}

@ -310,18 +310,18 @@ libxrdp_send_palette(struct xrdp_session *session, int *palette)
}
DEBUG(("libxrdp_send_palette sending palette"));
/* clear orders */
libxrdp_orders_force_send(session);
make_stream(s);
init_stream(s, 8192);
if (session->client_info->use_fast_path & 1) /* fastpath output supported */
{
LLOGLN(10, ("libxrdp_send_palette: fastpath"));
if (xrdp_rdp_init_fastpath((struct xrdp_rdp *)session->rdp, s) != 0)
{
free_stream(s);
free_stream(s);
return 1;
}
}
@ -350,7 +350,7 @@ libxrdp_send_palette(struct xrdp_session *session, int *palette)
if (xrdp_rdp_send_fastpath((struct xrdp_rdp *)session->rdp, s,
FASTPATH_UPDATETYPE_PALETTE) != 0)
{
free_stream(s);
free_stream(s);
return 1;
}
}
@ -360,7 +360,7 @@ libxrdp_send_palette(struct xrdp_session *session, int *palette)
RDP_DATA_PDU_UPDATE);
}
free_stream(s);
/* send the orders palette too */
libxrdp_orders_init(session);
libxrdp_orders_send_palette(session, palette, 0);
@ -674,7 +674,7 @@ libxrdp_send_pointer(struct xrdp_session *session, int cache_idx,
switch (bpp)
{
case 15:
//case 15: /* coverity: this is logically dead code */
case 16:
p16 = (tui16 *) data;
for (i = 0; i < 32; i++)
@ -782,7 +782,7 @@ libxrdp_set_pointer(struct xrdp_session *session, int cache_idx)
if (xrdp_rdp_send_fastpath((struct xrdp_rdp *)session->rdp, s,
FASTPATH_UPDATETYPE_CACHED) != 0)
{
free_stream(s);
free_stream(s);
return 1;
}
}

@ -174,8 +174,10 @@ rdp_lic_process_demand(struct rdp_lic *self, struct stream *s)
the security of licence negotiation isn't exactly paramount. */
g_memset(null_data, 0, sizeof(null_data));
rdp_lic_generate_keys(self, null_data, server_random, null_data);
licence_size = 0; /* todo load_licence(&licence_data); */
#if 0
if (licence_size > 0)
{
/* Generate a signature for the HWID buffer */
@ -192,6 +194,7 @@ rdp_lic_process_demand(struct rdp_lic *self, struct stream *s)
g_free(licence_data);
return;
}
#endif
rdp_lic_send_request(self, null_data, null_data,
self->sec_layer->rdp_layer->mod->username,

@ -219,12 +219,6 @@ scp_v0s_accept(struct SCP_CONNECTION *c, struct SCP_SESSION **s, int skipVchk)
{
scp_session_set_type(session, SCP_SESSION_TYPE_XORG);
}
else
{
log_message(LOG_LEVEL_WARNING, "[v0:%d] connection aborted: "
"invalid code in xrdp.ini file: code=%d", __LINE__, code);
return SCP_SERVER_STATE_INTERNAL_ERR;
}
/* reading username */
in_uint16_be(c->in_s, sz);

@ -243,11 +243,13 @@ WTSVirtualChannelWrite(void *hChannelHandle, const char *Buffer,
return 0;
}
#if 0 /* coverity: this is dead code */
/* error, but is it ok to try again? */
if ((rv == EWOULDBLOCK) || (rv == EAGAIN) || (rv == EINPROGRESS))
{
return 0; /* failed to send, but should try again */
}
#endif
/* fatal error */
return -1;

Loading…
Cancel
Save