Misc code cleanups

* src/packet.c: Remove a dead store
* src/res.c: Remove a dead store
* src/sslproc.c: Remove a dead store
* src/sslproc.c: Don't call the same accessor twice

These silence some fairly harmless compiler warnings
This commit is contained in:
Aaron Jones 2015-03-27 23:04:39 +00:00
parent cf3b152547
commit 32fb589528
3 changed files with 4 additions and 7 deletions

View File

@ -235,7 +235,6 @@ read_packet(rb_fde_t * F, void *data)
{
struct Client *client_p = data;
int length = 0;
int lbuf_len;
int binary = 0;
#ifdef USE_IODEBUG_HOOKS
@ -288,7 +287,7 @@ read_packet(rb_fde_t * F, void *data)
if(IsHandshake(client_p) || IsUnknown(client_p))
binary = 1;
lbuf_len = rb_linebuf_parse(&client_p->localClient->buf_recvq, readBuf, length, binary);
(void) rb_linebuf_parse(&client_p->localClient->buf_recvq, readBuf, length, binary);
if(IsAnyDead(client_p))
return;

View File

@ -617,7 +617,6 @@ static int proc_answer(struct reslist *request, HEADER * header, char *buf, char
{
char hostbuf[IRCD_RES_HOSTLEN + 100]; /* working buffer */
unsigned char *current; /* current position in buf */
int query_class; /* answer class */
int type; /* answer type */
int n; /* temp count */
int rd_length;
@ -674,7 +673,7 @@ static int proc_answer(struct reslist *request, HEADER * header, char *buf, char
type = irc_ns_get16(current);
current += TYPE_SIZE;
query_class = irc_ns_get16(current);
(void) irc_ns_get16(current);
current += CLASS_SIZE;
request->ttl = irc_ns_get32(current);

View File

@ -339,9 +339,8 @@ ssl_process_zipstats(ssl_ctl_t * ctl, ssl_ctl_buf_t * ctl_buf)
{
struct Client *server;
struct ZipStats *zips;
int parc;
char *parv[7];
parc = rb_string_to_array(ctl_buf->buf, parv, 6);
(void) rb_string_to_array(ctl_buf->buf, parv, 6);
server = find_server(NULL, parv[1]);
if(server == NULL || server->localClient == NULL || !IsCapable(server, CAP_ZIP))
return;
@ -826,7 +825,7 @@ collect_zipstats(void *unused)
len = sizeof(uint8_t) + sizeof(uint32_t);
id = rb_get_fd(target_p->localClient->F);
int32_to_buf(&buf[1], rb_get_fd(target_p->localClient->F));
int32_to_buf(&buf[1], id);
rb_strlcpy(odata, target_p->name, (sizeof(buf) - len));
len += strlen(odata) + 1; /* Get the \0 as well */
ssl_cmd_write_queue(target_p->localClient->z_ctl, NULL, 0, buf, len);