From 3dd01111e29b01b77c5c07c345b1f97ad29bbc4c Mon Sep 17 00:00:00 2001 From: drh <> Date: Fri, 1 Oct 2021 02:45:48 +0000 Subject: [PATCH] Remove unreachable branches in the fixed group_concat() code. FossilOrigin-Name: 8bd721c29e7a28cd75885dd80235e4e37aa0847229f769f49e01127f794fa63a --- manifest | 12 ++++++------ manifest.uuid | 2 +- src/func.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/manifest b/manifest index dbfc97538a..38694f3a3d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Merge\supdates\sfrom\strunk -D 2021-10-01T02:16:52.236 +C Remove\sunreachable\sbranches\sin\sthe\sfixed\sgroup_concat()\scode. +D 2021-10-01T02:45:48.526 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -504,7 +504,7 @@ F src/delete.c 3ce6af6b64c8b476de51ccc32da0cb3142d42e65754e1d8118addf65b8bcba15 F src/expr.c 82797e5d82422d34ede9a95ba459f40c317b2daadb21109a21abfd42f84e3ed8 F src/fault.c 460f3e55994363812d9d60844b2a6de88826e007 F src/fkey.c 1905af1821b88321e1bb9d6a69e704495b6844a9b6c29398d40117cc251e893c -F src/func.c 35e0beafdbd8e9d7050577668ab3f515b86d8aff18bb81603d961d9152955b16 +F src/func.c 3b8bfd557ae3dc64a2e5c84ae300c770d66f17c13c9066badddcff9a5a74d10d F src/global.c 612ea60c9acbcb45754c2ed659b4a56936a06814718e969636fedc7e3b889808 F src/hash.c 8d7dda241d0ebdafb6ffdeda3149a412d7df75102cecfc1021c98d6219823b19 F src/hash.h 9d56a9079d523b648774c1784b74b89bd93fac7b365210157482e4319a468f38 @@ -1929,7 +1929,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 04399cf9645e04b171090ff8a3c27752929c10d2cd8778e26f8f3337aa902ab6 6e791a24ce259ff6cc46a7c2188aea094a5021e154368f57019a0653c8a81217 -R d3b716f0cf9b6ef6a1679ee563e22ef8 +P 35351371c5e9602dec210ad0926ff8a1a269556ce1a166e81eb0543938e0c57e +R a4645f8bac89b041843b69411193844d U drh -Z f141141cc66d39890f48912f4e8ef81f +Z 93aa411e4c74267eee528d19e6131eb7 diff --git a/manifest.uuid b/manifest.uuid index 1c635395f0..5ba132f6ce 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -35351371c5e9602dec210ad0926ff8a1a269556ce1a166e81eb0543938e0c57e \ No newline at end of file +8bd721c29e7a28cd75885dd80235e4e37aa0847229f769f49e01127f794fa63a \ No newline at end of file diff --git a/src/func.c b/src/func.c index 860466bc10..fddced62db 100644 --- a/src/func.c +++ b/src/func.c @@ -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