X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fzip-reader.c;h=00249e0bae41be64128720410c0079c7e819a230;hb=7b7d1e6fbf05cf190814b1f64d8ee363203d7499;hp=b28ac75f8ba4e93c846f3227ab32e283f9013cd3;hpb=bd5e8f74de87b9061ff62615f48fb378e844e87d;p=pspp diff --git a/src/libpspp/zip-reader.c b/src/libpspp/zip-reader.c index b28ac75f8b..00249e0bae 100644 --- a/src/libpspp/zip-reader.c +++ b/src/libpspp/zip-reader.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2011, 2013, 2014 Free Software Foundation, Inc. + Copyright (C) 2011, 2013, 2014, 2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -378,7 +378,7 @@ zip_reader_create (const char *file_name, struct zip_reader **zrp) return NULL; } - struct zip_reader *zr = xzalloc (sizeof *zr); + struct zip_reader *zr = XZALLOC (struct zip_reader); zr->ref_cnt = 1; zr->file_name = xstrdup (file_name); zr->entries = xcalloc (n_members, sizeof *zr->entries); @@ -577,7 +577,7 @@ probe_magic (FILE *fp, uint32_t magic, off_t start, off_t stop, off_t *off) if (0 > fseeko (fp, start, SEEK_SET)) { - return -1; + return false; } for (i = 0; i < 4 ; ++i) @@ -668,7 +668,7 @@ static char * inflate_init (struct zip_member *zm) { int r; - struct inflator *inf = xzalloc (sizeof *inf); + struct inflator *inf = XZALLOC (struct inflator); uint16_t flg = 0 ; uint16_t cmf = 0x8; /* Always 8 for inflate */