lib: os: add final else where missing in cbprintf_*

cbprintf_* had several places missing final elsestatement in the
if else if construct. This commit adds else {} to comply with
coding guideline 15.7.

Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
This commit is contained in:
Jennifer Williams 2021-04-28 10:49:37 -07:00 committed by Anas Nashif
parent b504f8b6a2
commit 254dfd4aba
2 changed files with 14 additions and 0 deletions

View File

@ -557,6 +557,8 @@ int_conv:
default:
break;
}
} else {
;
}
break;
@ -586,6 +588,8 @@ int_conv:
} else if ((conv->length_mod != LENGTH_NONE)
&& (conv->length_mod != LENGTH_UPPER_L)) {
conv->invalid = true;
} else {
;
}
break;
@ -802,6 +806,8 @@ static char *encode_uint(uint_value_type value,
conv->altform_0 = true;
} else if (radix == 16) {
conv->altform_0c = true;
} else {
;
}
}
@ -878,6 +884,8 @@ static char *encode_float(double value,
*sign = '+';
} else if (conv->flag_space) {
*sign = ' ';
} else {
;
}
/* Extract the non-negative offset exponent and fraction. Record
@ -1392,6 +1400,8 @@ int cbvprintf(cbprintf_cb out, void *ctx, const char *fp, va_list ap)
}
} else if (conv->width_present) {
width = conv->width_value;
} else {
;
}
/* If dynamic precision is specified, process it, otherwise
@ -1408,6 +1418,8 @@ int cbvprintf(cbprintf_cb out, void *ctx, const char *fp, va_list ap)
}
} else if (conv->prec_present) {
precision = conv->prec_value;
} else {
;
}
/* Reuse width and precision memory in conv for value

View File

@ -204,6 +204,8 @@ start:
} else if (special == '+') {
prefix = "+";
min_width--;
} else {
;
}
data_len = convert_value(d, 10, 0, buf + sizeof(buf));
data = buf + sizeof(buf) - data_len;