File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,8 @@ prv_out_fn_print(lwprintf_int_t* lwi, const char chr) {
179179 if (lwi -> is_print_cancelled ) {
180180 return 0 ;
181181 }
182- /*!< Send character to output */
182+
183+ /* Send character to output */
183184 if (!lwi -> lwobj -> out_fn (chr , lwi -> lwobj )) {
184185 lwi -> is_print_cancelled = 1 ;
185186 }
@@ -216,13 +217,11 @@ prv_out_fn_write_buff(lwprintf_int_t* lwi, const char chr) {
216217 */
217218static int
218219prv_parse_num (const char * * format ) {
219- const char * fmt = * format ;
220220 int num = 0 ;
221221
222- for (; CHARISNUM (* fmt ); ++ fmt ) {
223- num = (int )10 * num + CHARTONUM (* fmt );
222+ for (; CHARISNUM (* * format ); ++ ( * format ) ) {
223+ num = (int )10 * num + CHARTONUM (* * format );
224224 }
225- * format = fmt ;
226225 return num ;
227226}
228227
@@ -615,13 +614,8 @@ prv_double_to_str(lwprintf_int_t* lwi, double in_num) {
615614 if (def_type == 'g' ) {
616615 /* As per standard to decide level of precision */
617616 if (exp_cnt >= -4 && exp_cnt < lwi -> m .precision ) {
618- if (lwi -> m .precision > exp_cnt ) {
619- lwi -> m .precision -= exp_cnt + 1 ;
620- chosen_precision -= exp_cnt + 1 ;
621- } else {
622- lwi -> m .precision = 0 ;
623- chosen_precision = 0 ;
624- }
617+ lwi -> m .precision -= exp_cnt + 1 ;
618+ chosen_precision -= exp_cnt + 1 ;
625619 lwi -> m .type = 'f' ;
626620 in_num = orig_num ;
627621 } else {
You can’t perform that action at this time.
0 commit comments