Jeff King writes:
> On Fri, May 12, 2017 at 11:28:50PM -0400, Jeff King wrote:
>
>> +static NORETURN void BUG_vfl(const char *file, int line, const char *fmt,
>> va_list params)
>> +{
>> +char prefix[256];
>> +
>> +/* truncation via snprintf is OK here */
>> +if (file)
>> +
On Fri, May 12, 2017 at 11:28:50PM -0400, Jeff King wrote:
> +static NORETURN void BUG_vfl(const char *file, int line, const char *fmt,
> va_list params)
> +{
> + char prefix[256];
> +
> + /* truncation via snprintf is OK here */
> + if (file)
> + snprintf(prefix, sizeof(p
There's a convention in Git's code base to write assertions
as:
if (...some_bad_thing...)
die("BUG: the terrible thing happened");
with the idea that users should never see a "BUG:" message
(but if they, it at least gives a clue what happened). We
use die() here because it's convenient
3 matches
Mail list logo