1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Remove unreachable branches in the fixed group_concat() code.

FossilOrigin-Name: 8bd721c29e7a28cd75885dd80235e4e37aa0847229f769f49e01127f794fa63a
This commit is contained in:
drh
2021-10-01 02:45:48 +00:00
parent 817424fe37
commit 3dd01111e2
3 changed files with 9 additions and 9 deletions

View File

@@ -1784,7 +1784,7 @@ static void groupConcatStep(
pnsl = (int*)sqlite3_realloc64(pnsl, pGCC->nAccum * sizeof(int));
}
if( pnsl!=0 ){
if( pGCC->nAccum>0 ){
if( ALWAYS(pGCC->nAccum>0) ){
pnsl[pGCC->nAccum-1] = nSep;
}
pGCC->pnSepLengths = pnsl;
@@ -1796,7 +1796,7 @@ static void groupConcatStep(
}
#ifndef SQLITE_OMIT_WINDOWFUNC
else{
pGCC->nFirstSepLength = (argc==2)? sqlite3_value_bytes(argv[1]) : 1;
pGCC->nFirstSepLength = sqlite3_value_bytes(argv[1]);
}
pGCC->nAccum += 1;
#endif