diff options
author | Maria Matejka <mq@ucw.cz> | 2020-05-01 15:34:17 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2020-05-01 15:34:17 +0200 |
commit | 048eb2ddf1ee9587d9fa30cbb3f87d6f650a2133 (patch) | |
tree | fdec4c5679a02c901cf2bc92fd81618c6f12d48e /conf/cf-lex.l | |
parent | 17de3a023f7bde293892b41bfafe5740c8553fc8 (diff) | |
parent | 59238768b3b05fa134348d2232b42537d0403994 (diff) |
Merge remote-tracking branch 'origin/mq-static-analysis'
Diffstat (limited to 'conf/cf-lex.l')
-rw-r--r-- | conf/cf-lex.l | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/conf/cf-lex.l b/conf/cf-lex.l index 1d6cae2c..9ea05e9d 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -169,7 +169,7 @@ WHITE [ \t] errno = 0; l = bstrtoul10(yytext, &e); - if (e && (*e != ':') || (errno == ERANGE) || (l >> 32)) + if (!e || (*e != ':') || (errno == ERANGE) || (l >> 32)) cf_error("ASN out of range"); if (l >> 16) @@ -187,7 +187,7 @@ WHITE [ \t] errno = 0; l = bstrtoul10(e+1, &e); - if (e && *e || (errno == ERANGE) || (l >> len2)) + if (!e || *e || (errno == ERANGE) || (l >> len2)) cf_error("Number out of range"); cf_lval.i64 |= l; @@ -214,13 +214,13 @@ WHITE [ \t] errno = 0; l = bstrtoul10(yytext+2, &e); - if (e && (*e != ':') || (errno == ERANGE) || (l >> len1)) + if (!e || (*e != ':') || (errno == ERANGE) || (l >> len1)) cf_error("ASN out of range"); cf_lval.i64 |= ((u64) l) << len2; errno = 0; l = bstrtoul10(e+1, &e); - if (e && *e || (errno == ERANGE) || (l >> len2)) + if (!e || *e || (errno == ERANGE) || (l >> len2)) cf_error("Number out of range"); cf_lval.i64 |= l; @@ -242,7 +242,7 @@ WHITE [ \t] errno = 0; l = bstrtoul10(e, &e); - if (e && *e || (errno == ERANGE) || (l >> 16)) + if (!e || *e || (errno == ERANGE) || (l >> 16)) cf_error("Number out of range"); cf_lval.i64 |= l; @@ -266,7 +266,7 @@ WHITE [ \t] unsigned long int l; errno = 0; l = bstrtoul16(yytext+2, &e); - if (e && *e || errno == ERANGE || (unsigned long int)(unsigned int) l != l) + if (!e || *e || errno == ERANGE || (unsigned long int)(unsigned int) l != l) cf_error("Number out of range"); cf_lval.i = l; return NUM; @@ -277,7 +277,7 @@ WHITE [ \t] unsigned long int l; errno = 0; l = bstrtoul10(yytext, &e); - if (e && *e || errno == ERANGE || (unsigned long int)(unsigned int) l != l) + if (!e || *e || errno == ERANGE || (unsigned long int)(unsigned int) l != l) cf_error("Number out of range"); cf_lval.i = l; return NUM; |