Subject: Re: [RFC] cocci: .buf in a strbuf object can never be NULL

From: Junio C Hamano <[email-masked]>
Date: Sat, 21 Mar 2026 18:22:38 -0700

Jeff King <[email-masked]> writes:

> Could the function be rewritten differently, or maybe even made a little
> simpler? Perhaps, but who cares? The function has been largely untouched
> for a decade and the behavior is fine. And there are a bunch of pitfalls
> that a rewrite risks falling into.

Well, my only interest in this codepath was to get rid of "if
(!sb->buf)" so that I can lift the special case in the Coccinelle
rule.  Nothing else.