lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] [lwip] Compiler Warning


From: Martin Glunz
Subject: [lwip-users] [lwip] Compiler Warning
Date: Thu, 09 Jan 2003 00:07:28 -0000

Function do_close() inside api_msg.c:

  err_t err;
...
    case NETCONN_TCP:
      if(msg->conn->pcb.tcp->state == LISTEN) {
        err = tcp_close(msg->conn->pcb.tcp);
      }
      msg->conn->err = err;      
      break;
...

err is used unitialized here. Does it make sense to
initialize ther err variable:

  err_t err=ERR_OK;

or rather rearrange the code:

...
    case NETCONN_TCP:
      if(msg->conn->pcb.tcp->state == LISTEN) {
        err = tcp_close(msg->conn->pcb.tcp);
        msg->conn->err = err;      
      }
      break;
...
?


Martin Glunz
[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]