##// END OF EJS Templates
mercurial/parsers.c: fix compiler warning...
Abhay Kadam -
r20110:40b7c6e4 default
parent child Browse files
Show More
@@ -927,8 +927,13 b' static int nt_insert(indexObject *self, '
927 927 static int nt_init(indexObject *self)
928 928 {
929 929 if (self->nt == NULL) {
930 if (self->raw_length > INT_MAX) {
931 PyErr_SetString(PyExc_ValueError, "overflow in nt_init");
932 return -1;
933 }
930 934 self->ntcapacity = self->raw_length < 4
931 ? 4 : self->raw_length / 2;
935 ? 4 : (int)self->raw_length / 2;
936
932 937 self->nt = calloc(self->ntcapacity, sizeof(nodetree));
933 938 if (self->nt == NULL) {
934 939 PyErr_NoMemory();
General Comments 0
You need to be logged in to leave comments. Login now