(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/util/rawlog.c) |
| |
| 132 | | | static void server_input(struct rawlog_proxy *proxy) |
| 133 | | | { |
| 134 | | | unsigned char buf[OUTBUF_THRESHOLD]; |
| 135 | | | ssize_t ret; |
| 136 | | | |
| 137 | | | if (o_stream_get_buffer_used_size(proxy->client_output) > |
| 138 | | | OUTBUF_THRESHOLD) { |
| 139 | | | |
| 140 | | | |
| 141 | | | io_remove(&proxy->server_io); |
| 142 | | | return; |
| 143 | | | } |
| 144 | | | |
| 145 | | | ret = net_receive(proxy->server_fd, buf, sizeof(buf)); |
| 146 | | | if (ret > 0) { |
| 147 | | | (void)o_stream_send(proxy->client_output, buf, ret); |
| 148 | | | proxy_write_out(proxy, buf, ret); |
| 149 | | | } else if (ret <= 0) |
Redundant Condition
ret <= 0 always evaluates to true. This may be because: - There is a constant assignment to one or more of the variables involved.
- An earlier conditional statement has already ensured that ret <= 0 cannot be false.
- A crashing bug occurs on every path where ret <= 0 could have evaluated to false. Look for a preceding Null Pointer Dereference or Division By Zero warning.
|
|
| 150 | | | rawlog_proxy_destroy(proxy); |
| 151 | | | } |
| |