]> Kevux Git Server - rit/commit
cocci: strbuf.buf is never NULL
authorJunio C Hamano <gitster@pobox.com>
Thu, 19 Mar 2026 22:39:02 +0000 (15:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Mar 2026 01:33:33 +0000 (18:33 -0700)
commitf64c50e76827f39c843102bc603817648a38a48c
tree8f6deb59d11b9856d75f4038fbdf0270d35a3f62
parent753c8101b027f34359a921a8acb3abe7f10058c5
cocci: strbuf.buf is never NULL

We recently noticed one old code from 19 years ago protecting
against an ancient strbuf convention that the .buf member can be
NULL for an empty strbuf.  As that is no longer the case in the
modern codebase, let's catch such a construct.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/strbuf.cocci