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)
251251 printbuf_nul_terminate_reserved (out );
252252}
253253
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+
254264/**
255265 * printbuf_reset - re-use a printbuf without freeing and re-initializing it:
256266 */
257267static inline void printbuf_reset (struct printbuf * buf )
258268{
259- buf -> pos = 0 ;
260- buf -> allocation_failure = 0 ;
261- buf -> indent = 0 ;
269+ printbuf_reset_keep_tabstops (buf );
262270 buf -> nr_tabstops = 0 ;
263- buf -> cur_tabstop = 0 ;
264271}
265272
266273/**
You can’t perform that action at this time.
0 commit comments