提交 1bb2daea 编写于 作者: R Rich Salz

Simplify parse_yesno; remove local variable

Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 bc2f5803
......@@ -1803,7 +1803,6 @@ void free_index(CA_DB *db)
int parse_yesno(const char *str, int def)
{
int ret = def;
if (str) {
switch (*str) {
case 'f': /* false */
......@@ -1811,21 +1810,16 @@ int parse_yesno(const char *str, int def)
case 'n': /* no */
case 'N': /* NO */
case '0': /* 0 */
ret = 0;
break;
return 0;
case 't': /* true */
case 'T': /* TRUE */
case 'y': /* yes */
case 'Y': /* YES */
case '1': /* 1 */
ret = 1;
break;
default:
ret = def;
break;
return 1;
}
}
return ret;
return def;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册