changeset 40099:994010b87534

revlog: explicitly initialize static variables I know .bss section is zero-filled, but explicit initialization should be better as we rely on that.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 09 Oct 2018 07:42:05 +0900
parents 8a08aefa9273
children ca4a32d0a4d6
files mercurial/cext/revlog.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/revlog.c	Mon Oct 08 21:53:32 2018 +0200
+++ b/mercurial/cext/revlog.c	Tue Oct 09 07:42:05 2018 +0900
@@ -94,8 +94,8 @@
 	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);