1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Remove a redundant parameter extraction call from the percentile.c extension.

FossilOrigin-Name: d49c32e6e7cc341b5961d2c7b7c68d1649c6542eeec201660e3f82a55aea9e3b
This commit is contained in:
drh
2019-03-02 12:17:35 +00:00
parent f10c535fa5
commit 8f46f34e2d
3 changed files with 9 additions and 9 deletions

View File

@@ -108,8 +108,8 @@ static void percentStep(sqlite3_context *pCtx, int argc, sqlite3_value **argv){
/* Requirement 3: P must be a number between 0 and 100 */
eType = sqlite3_value_numeric_type(argv[1]);
rPct = sqlite3_value_double(argv[1]);
if( (eType!=SQLITE_INTEGER && eType!=SQLITE_FLOAT) ||
((rPct = sqlite3_value_double(argv[1]))<0.0 || rPct>100.0) ){
if( (eType!=SQLITE_INTEGER && eType!=SQLITE_FLOAT)
|| rPct<0.0 || rPct>100.0 ){
sqlite3_result_error(pCtx, "2nd argument to percentile() is not "
"a number between 0.0 and 100.0", -1);
return;