strbuf: use skip_prefix() in strbuf_addftime()
commit945c72250afcf50a0f5394151b76d5da28fa6f94
authorRené Scharfe <l.s.r@web.de>
Sun, 16 Jul 2023 08:52:33 +0000 (16 10:52 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Jul 2023 16:24:49 +0000 (17 09:24 -0700)
treec786b61430c16339fd61ba978124ac94df7ff28e
parentda269af9207e38e820daad8aa993caa7d2fad76c
strbuf: use skip_prefix() in strbuf_addftime()

Use the now common skip_prefix() cascade instead of a case statement to
parse the strftime(3) format in strbuf_addftime().  skip_prefix() parses
the "fmt" pointer and advances it appropriately, making additional
pointer arithmetic unnecessary.  The resulting code is more compact and
consistent with most other strbuf_expand_step() loops.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
strbuf.c