Commit 438fe879 authored by Lev Walkin's avatar Lev Walkin

avoid compile warning

parent d62d7d51
...@@ -300,13 +300,16 @@ process_line(const char *fname, char *line, int lineno) { ...@@ -300,13 +300,16 @@ process_line(const char *fname, char *line, int lineno) {
} }
break; break;
} }
unsigned long tag_value_UL;
errno = 0; errno = 0;
if(!*tcl_pos if(!*tcl_pos
|| ((long)(tag_value = strtoul(tcl_pos, 0, 10))) < 0 || ((tag_value_UL = strtoul(tcl_pos, 0, 10)) > UINT_MAX)
|| errno) { || errno) {
fprintf(stderr, "%s: Invalid tag value (%c) at line %d\n", fprintf(stderr, "%s: Invalid tag value (%c) at line %d\n",
fname, *tcl_pos, lineno); fname, *tcl_pos, lineno);
exit(EX_DATAERR); exit(EX_DATAERR);
} else {
tag_value = tag_value_UL;
} }
tlv_tag = ((tag_value << 2) | tag_class); tlv_tag = ((tag_value << 2) | tag_class);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment