common: no logic changes, code cleanup

ulab-next
Jay Sorg 12 years ago
parent 0944509cf0
commit 7dc5a77116

@ -1125,11 +1125,13 @@ g_obj_wait(tbus* read_objs, int rcount, tbus* write_objs, int wcount,
FD_ZERO(&rfds);
FD_ZERO(&wfds);
/* Find the highest descriptor number in read_obj */
if(read_objs!=NULL){
if (read_objs!=NULL)
{
for (i = 0; i < rcount; i++)
{
sck = (int)(read_objs[i]);
if (sck > 0) {
if (sck > 0)
{
FD_SET(sck, &rfds);
if (sck > max)
{
@ -1143,11 +1145,13 @@ g_obj_wait(tbus* read_objs, int rcount, tbus* write_objs, int wcount,
g_writeln("Programming error read_objs is null");
return 1; /* error */
}
if(write_objs!=NULL){
if (write_objs!=NULL)
{
for (i = 0; i < wcount; i++)
{
sck = (int)(write_objs[i]);
if (sck > 0) {
if (sck > 0)
{
FD_SET(sck, &wfds);
if (sck > max)
{
@ -1632,7 +1636,8 @@ g_strdup(const char* in)
}
len = g_strlen(in);
p = (char*)g_malloc(len + 1, 0);
if (p != NULL) {
if (p != NULL)
{
g_strcpy(p, in);
}
return p;

Loading…
Cancel
Save