[iscsictl] Fix compile issues that creep up with gcc-6.4

This fixes two warnings:

* double-definition of a symbol in a yacc header
* Comparison of an unsigned int being >= 0; that's always
  going to be true.

Reviewed by:	imp, rscheff
Differential Revision:	https://reviews.freebsd.org/D27036
This commit is contained in:
Adrian Chadd 2020-11-01 15:57:14 +00:00
parent 1ebef47735
commit c2a5b2abc7

View File

@ -54,7 +54,6 @@ static struct conf *conf;
static struct target *target;
extern void yyerror(const char *);
extern int yylex(void);
extern void yyrestart(FILE *);
%}
@ -359,7 +358,7 @@ pcp: PCP EQUALS STR
free($3);
return(1);
}
if (!((tmp >=0) && (tmp <= 7))) {
if (tmp > 7) {
yyerror("invalid pcp value");
return(1);
}