Skip to content

Commit

Permalink
Fix some compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Feb 17, 2015
1 parent b461050 commit 0a37498
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/res.c
Expand Up @@ -628,7 +628,6 @@ static void store_alist_dir(LEX *lc, RES_ITEM *item, int index, int pass)
*/
static void store_plugin_names(LEX *lc, RES_ITEM *item, int index, int pass)
{
int token;
alist *list;
char *p, *plugin_name, *plugin_names;
URES *res_all = (URES *)my_config->m_res_all;
Expand Down Expand Up @@ -1417,15 +1416,16 @@ bool BRSRES::print_config(POOL_MEM &buff)
POOL_MEM temp;
RES_ITEM *items;
int i = 0;
int rindex = this->hdr.rcode - my_config->m_r_first;
int rindex;

/*
* If entry is not used, then there is nothing to print.
*/
if (this->hdr.rcode < my_config->m_r_first ||
if (this->hdr.rcode < (uint32_t)my_config->m_r_first ||
this->hdr.refcnt <= 0) {
return true;
}
rindex = this->hdr.rcode - my_config->m_r_first;

/*
* Make sure the resource class has any items.
Expand Down

0 comments on commit 0a37498

Please sign in to comment.