# HG changeset patch # User Yuya Nishihara # Date 2018-10-08 22:42:05 # Node ID 994010b8753498b379384f9d75bfdecaffaab7ad # Parent 8a08aefa9273e6f328f238e4793f9a43f314e471 revlog: explicitly initialize static variables I know .bss section is zero-filled, but explicit initialization should be better as we rely on that. diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -94,8 +94,8 @@ static Py_ssize_t index_length(const ind return self->length + PyList_GET_SIZE(self->added); } -static PyObject *nullentry; -static const char nullid[20]; +static PyObject *nullentry = NULL; +static const char nullid[20] = {0}; static Py_ssize_t inline_scan(indexObject *self, const char **offsets);