Fix: NEGATIVE_RETURNS (CWE-394)
authorTomas Hozza <thozza@redhat.com>
Sun, 24 Feb 2013 09:38:50 +0000 (10:38 +0100)
committerHendrik Sattler <post@hendrik-sattler.de>
Sun, 24 Feb 2013 09:38:50 +0000 (10:38 +0100)
commit02442088c2781cb93ea065ac2a460b60a10a99f5
tree7ab019dbe8974196c6bc1a908c5cb94d14e7eba1
parentbd9bb8ccb13fd5dd168cf9f8bce089e4fc3ae132
Fix: NEGATIVE_RETURNS (CWE-394)

Coverity output:
apps/ircp/ircp_client.c:281: cond_false: Condition "!(cli != NULL)", taking
false branch
apps/ircp/ircp_client.c:281: if_end: End of if statement
apps/ircp/ircp_client.c:285: negative_return_fn: Function
"open(localname, 0, 0)" returns a negative number.
apps/ircp/ircp_client.c:285: var_assign: Assigning: signed variable
"cli->fd" = "open(char const *, int, ...)".
apps/ircp/ircp_client.c:286: cond_true: Condition "cli->fd < 0", taking true
branch
apps/ircp/ircp_client.c:287: if_fallthrough: Falling through to end of if
statement
apps/ircp/ircp_client.c:289: if_end: End of if statement
apps/ircp/ircp_client.c:291: negative_returns: "cli->fd" is passed to a
parameter that cannot be negative.
apps/ircp/ircp_client.c