File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -251,16 +251,23 @@ static inline void prt_hex_byte_upper(struct printbuf *out, u8 byte)
251
251
printbuf_nul_terminate_reserved (out );
252
252
}
253
253
254
+ static inline void printbuf_reset_keep_tabstops (struct printbuf * buf )
255
+ {
256
+ buf -> pos = 0 ;
257
+ buf -> allocation_failure = 0 ;
258
+ buf -> last_newline = 0 ;
259
+ buf -> last_field = 0 ;
260
+ buf -> indent = 0 ;
261
+ buf -> cur_tabstop = 0 ;
262
+ }
263
+
254
264
/**
255
265
* printbuf_reset - re-use a printbuf without freeing and re-initializing it:
256
266
*/
257
267
static inline void printbuf_reset (struct printbuf * buf )
258
268
{
259
- buf -> pos = 0 ;
260
- buf -> allocation_failure = 0 ;
261
- buf -> indent = 0 ;
269
+ printbuf_reset_keep_tabstops (buf );
262
270
buf -> nr_tabstops = 0 ;
263
- buf -> cur_tabstop = 0 ;
264
271
}
265
272
266
273
/**
You can’t perform that action at this time.
0 commit comments