Move a variable declaration closer to its use, avoid a redundant
?true:false;
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
int i, toc_index, subcount;
uint64_t result;
sl_nil_t nil;
- sl_bool_t b;
struct sl_tag tag, cpx_tag;
while (count > 0) {
count -= subcount;
break;
- case SQ_TYPE_BOOL:
- b = tag.count != 0 ? true : false;
+ case SQ_TYPE_BOOL: {
+ sl_bool_t b = (tag.count != 0);
+
result = dalloc_add_copy(query, &b, sl_bool_t);
if (result != 0) {
return -1;
offset += tag.size;
count--;
break;
+ }
case SQ_TYPE_INT64:
subcount = sl_unpack_ints(query, buf, offset, bufsize, encoding);