coverity: fixed unchecked return value

This commit is contained in:
Laxmikant Rashinkar 2014-07-19 13:06:25 -07:00
parent 3bb31876e7
commit 73578bc612
4 changed files with 12 additions and 4 deletions

View File

@ -19,6 +19,7 @@
*/
#include "rdp.h"
#include "common/log.h"
/*****************************************************************************/
struct rdp_mcs *APP_CC
@ -598,7 +599,8 @@ failed"));
int APP_CC
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);
return 0;
}

View File

@ -812,7 +812,8 @@ my_api_trans_data_in(struct trans *trans)
in_uint8s(s, 12);
in_uint32_le(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)
{

View File

@ -1132,7 +1132,8 @@ sound_sndsrvr_source_data_in(struct trans *trans)
return 1;
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;
in_uint8(ts, cmd);

View File

@ -361,7 +361,11 @@ main(int argc, char **argv)
/* make sure the /tmp/.X11-unix directory exist */
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);
}