summaryrefslogtreecommitdiffstats
path: root/lib/libstand/zipfs.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-09-26 01:42:40 +0000
committermsmith <msmith@FreeBSD.org>1998-09-26 01:42:40 +0000
commitea783268e73e47b0c3012339d1e278e7045e2305 (patch)
tree622472325886767e4a3905d55b5180ea188a7e99 /lib/libstand/zipfs.c
parent73ca5cb35b01711ebbbdbdc1d00d3f320d0a852c (diff)
downloadFreeBSD-src-ea783268e73e47b0c3012339d1e278e7045e2305.zip
FreeBSD-src-ea783268e73e47b0c3012339d1e278e7045e2305.tar.gz
Replace the old and extremely icky Mach/NetBSD allocator with a similarly
compact and much better one donated by Matt Dillon. Implement a simple sbrk() which uses the existing setheap() api. Remove the custom allocator from the UFS code. It wasn't working quite right, and it shouldn't be needed with the new allocator. Fix a serious problem with changing the value of already-existent environment variables. Don't attempt to modify the supposedly-const argument to putenv() Fix an off-by-one sizing error in the zipfs code detected by the new allocator. Submitted by: zmalloc from Matt Dillon <dillon@backplane.com>
Diffstat (limited to 'lib/libstand/zipfs.c')
-rw-r--r--lib/libstand/zipfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libstand/zipfs.c b/lib/libstand/zipfs.c
index 3a9730b..fb64665 100644
--- a/lib/libstand/zipfs.c
+++ b/lib/libstand/zipfs.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: zipfs.c,v 1.1.1.1 1998/08/20 08:19:55 msmith Exp $
+ * $Id: zipfs.c,v 1.2 1998/09/18 22:58:01 msmith Exp $
*
*/
@@ -59,11 +59,13 @@ struct fs_ops zipfs_fsops = {
zf_stat
};
+#if 0
void *
calloc(int items, size_t size)
{
return(malloc(items * size));
}
+#endif
static int
zf_fill(struct z_file *zf)
@@ -175,7 +177,7 @@ zf_open(const char *fname, struct open_file *f)
return(ENOENT);
/* Construct new name */
- zfname = malloc(strlen(fname) + 3);
+ zfname = malloc(strlen(fname) + 4);
sprintf(zfname, "%s.gz", fname);
/* Try to open the compressed datafile */
OpenPOWER on IntegriCloud