mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-06-12 08:21:54 +03:00
Address review comments
- Use switch case instead of loop to generate faster code - Add #if defined to address compiler error Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
@ -119,13 +119,13 @@ foreach my $line (@matches)
|
||||
{
|
||||
$code_check = \$ll_code_check;
|
||||
$old_define = \$ll_old_define;
|
||||
$white_space = ' ';
|
||||
$white_space = ' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$code_check = \$hl_code_check;
|
||||
$old_define = \$hl_old_define;
|
||||
$white_space = ' ';
|
||||
$white_space = ' ';
|
||||
}
|
||||
|
||||
if ($define_name ne ${$old_define})
|
||||
@ -160,7 +160,9 @@ foreach my $line (@matches)
|
||||
${$old_define} = $define_name;
|
||||
}
|
||||
|
||||
${$code_check} .= "${white_space}\{.code = -($error_name), .description=\"$module_name - $description\"},\n";
|
||||
${$code_check} .= "${white_space}case -($error_name):\n".
|
||||
"${white_space} error_description = \"$module_name - $description\";\n".
|
||||
"${white_space} break;\n"
|
||||
};
|
||||
|
||||
if ($ll_old_define ne "")
|
||||
|
Reference in New Issue
Block a user