coverity: fixed unchecked return value

ulab-next-nosound
Laxmikant Rashinkar 10 years ago
parent 3bb31876e7
commit 73578bc612

@ -19,6 +19,7 @@
*/ */
#include "rdp.h" #include "rdp.h"
#include "common/log.h"
/*****************************************************************************/ /*****************************************************************************/
struct rdp_mcs *APP_CC struct rdp_mcs *APP_CC
@ -598,7 +599,8 @@ failed"));
int APP_CC int APP_CC
rdp_mcs_init(struct rdp_mcs *self, struct stream *s) rdp_mcs_init(struct rdp_mcs *self, struct stream *s)
{ {
rdp_iso_init(self->iso_layer, s); if (rdp_iso_init(self->iso_layer, s))
log_message(LOG_LEVEL_ERROR, "rdp_mcs.c: rdp_iso_init() failed");
s_push_layer(s, mcs_hdr, 8); s_push_layer(s, mcs_hdr, 8);
return 0; return 0;
} }

@ -812,7 +812,8 @@ my_api_trans_data_in(struct trans *trans)
in_uint8s(s, 12); in_uint8s(s, 12);
in_uint32_le(s, bytes_read); in_uint32_le(s, bytes_read);
init_stream(s, bytes_read); init_stream(s, bytes_read);
trans_force_read(trans, bytes_read); if (trans_force_read(trans, bytes_read))
log_message(LOG_LEVEL_ERROR, "chansrv.c: error reading from transport");
} }
else if (g_tcp_select(trans->sck, 0) & 1) else if (g_tcp_select(trans->sck, 0) & 1)
{ {

@ -1132,7 +1132,8 @@ sound_sndsrvr_source_data_in(struct trans *trans)
return 1; return 1;
ts = trans_get_in_s(trans); ts = trans_get_in_s(trans);
trans_force_read(trans, 3); if (trans_force_read(trans, 3))
log_message(LOG_LEVEL_ERROR, "sound.c: error reading from transport");
ts->p = ts->data + 8; ts->p = ts->data + 8;
in_uint8(ts, cmd); in_uint8(ts, cmd);

@ -361,7 +361,11 @@ main(int argc, char **argv)
/* make sure the /tmp/.X11-unix directory exist */ /* make sure the /tmp/.X11-unix directory exist */
if (!g_directory_exist("/tmp/.X11-unix")) if (!g_directory_exist("/tmp/.X11-unix"))
{ {
g_create_dir("/tmp/.X11-unix"); if (!g_create_dir("/tmp/.X11-unix"))
{
log_message(LOG_LEVEL_ERROR,
"sesman.c: error creating dir /tmp/.X11-unix");
}
g_chmod_hex("/tmp/.X11-unix", 0x1777); g_chmod_hex("/tmp/.X11-unix", 0x1777);
} }

Loading…
Cancel
Save