read_ilang: improve style. NFC.

Co-Authored-By: Alberto Gonzalez <61295559+boqwxp@users.noreply.github.com>
This commit is contained in:
whitequark 2020-04-06 18:31:15 +00:00 committed by GitHub
parent d22888ce74
commit b494d4c656
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -90,7 +90,7 @@ USING_YOSYS_NAMESPACE
[0-9]+'[01xzm-]* { rtlil_frontend_ilang_yylval.string = strdup(yytext); return TOK_VALUE; }
-?[0-9]+ {
char *end = NULL;
char *end = nullptr;
long value = strtol(yytext, &end, 10);
if (end != yytext + strlen(yytext))
return TOK_INVALID; // literal out of range of long
@ -146,4 +146,3 @@ USING_YOSYS_NAMESPACE
void *rtlil_frontend_ilang_avoid_input_warnings() {
return (void*)&yyinput;
}