mirror of
https://github.com/transmission/transmission.git
synced 2025-12-27 13:41:17 +00:00
refactor: sonarcloud "use if init" statements (#2587)
This commit is contained in:
@@ -450,8 +450,7 @@ static void jsonChildFunc(struct jsonWalk* data)
|
||||
case TR_VARIANT_TYPE_LIST:
|
||||
{
|
||||
++pstate.childIndex;
|
||||
bool const is_last = pstate.childIndex == pstate.childCount;
|
||||
if (!is_last)
|
||||
if (bool const is_last = pstate.childIndex == pstate.childCount; !is_last)
|
||||
{
|
||||
evbuffer_add(data->out, ",", 1);
|
||||
jsonIndent(data);
|
||||
|
||||
Reference in New Issue
Block a user