Re: [PATCH] strbuf: let strbuf_addftime handle %z and %Z itself

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 03.06.2017 um 15:13 schrieb Ulrich Mueller:
On Sat, 3 Jun 2017, René Scharfe wrote:

+			case 'Z':
+				strbuf_addstr(&munged_fmt, tz_name);

Is it guaranteed that tz_name cannot contain a percent sign itself?

Currently yes, because the only caller passes an empty string.

The fact that tz_name is subject to expansion by strftime could be
mentioned explicitly in strbuf.h.  I'm not sure if that's a desirable
property, but it allows callers to expand %z internally and %Z using
strftime.

René



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]