diff options
author | Guido van Rossum <guido@python.org> | 2000-06-28 21:27:21 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-06-28 21:27:21 (GMT) |
commit | 7d0ae5e14e984121ea57ff56ef56d40fb192bd9f (patch) | |
tree | 6d20ae358d05879582d3fd43926d8fed181e912a /Modules | |
parent | 2f8a05441893a404b67c3269f1f4ac15a7b9701f (diff) | |
download | cpython-7d0ae5e14e984121ea57ff56ef56d40fb192bd9f.zip cpython-7d0ae5e14e984121ea57ff56ef56d40fb192bd9f.tar.gz cpython-7d0ae5e14e984121ea57ff56ef56d40fb192bd9f.tar.bz2 |
Trent Mick: use size_t instead of int where appropriate (in
fromfile(), to hold fread() result.)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/arraymodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 96ec793..3ca1a80 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -1027,7 +1027,7 @@ array_fromfile(self, args) if (n > 0) { char *item = self->ob_item; int itemsize = self->ob_descr->itemsize; - int nread; + size_t nread; int newlength; size_t newbytes; /* Be careful here about overflow */ @@ -1045,7 +1045,7 @@ array_fromfile(self, args) self->ob_size += n; nread = fread(item + (self->ob_size - n) * itemsize, itemsize, n, fp); - if (nread < n) { + if (nread < (size_t)n) { self->ob_size -= (n - nread); PyMem_RESIZE(item, char, self->ob_size*itemsize); self->ob_item = item; |