From a27f79f69e578bd2df636a8713d538eb2647d767 Mon Sep 17 00:00:00 2001 From: cube Date: Sun, 23 Mar 2008 15:50:51 +0000 Subject: [PATCH] Use M_TEMP for allocations instead of the now deceased M_IOCTLOPS. --- sys/arch/amiga/dev/view.c | 12 ++++++------ sys/arch/atari/dev/view.c | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/arch/amiga/dev/view.c b/sys/arch/amiga/dev/view.c index 036ff38ef914..47513a9ce9f2 100644 --- a/sys/arch/amiga/dev/view.c +++ b/sys/arch/amiga/dev/view.c @@ -1,4 +1,4 @@ -/* $NetBSD: view.c,v 1.26 2007/03/04 05:59:29 christos Exp $ */ +/* $NetBSD: view.c,v 1.27 2008/03/23 15:50:51 cube Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -38,7 +38,7 @@ * a interface to graphics. */ #include -__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.26 2007/03/04 05:59:29 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.27 2008/03/23 15:50:51 cube Exp $"); #include #include @@ -343,7 +343,7 @@ view_get_colormap(struct view_softc *vu, colormap_t *ucm) /* add one incase of zero, ick. */ if (ucm->size + 1 > SIZE_T_MAX / sizeof(u_long)) return EINVAL; - cme = malloc(sizeof (u_long)*(ucm->size + 1), M_IOCTLOPS, M_WAITOK); + cme = malloc(sizeof (u_long)*(ucm->size + 1), M_TEMP, M_WAITOK); if (cme == NULL) return(ENOMEM); @@ -355,7 +355,7 @@ view_get_colormap(struct view_softc *vu, colormap_t *ucm) else error = copyout(cme, uep, sizeof(u_long) * ucm->size); ucm->entry = uep; /* set entry back to users. */ - free(cme, M_IOCTLOPS); + free(cme, M_TEMP); return(error); } @@ -366,7 +366,7 @@ view_set_colormap(struct view_softc *vu, colormap_t *ucm) int error; error = 0; - cm = malloc(sizeof(u_long) * ucm->size + sizeof (*cm), M_IOCTLOPS, + cm = malloc(sizeof(u_long) * ucm->size + sizeof (*cm), M_TEMP, M_WAITOK); if (cm == NULL) return(ENOMEM); @@ -377,7 +377,7 @@ view_set_colormap(struct view_softc *vu, colormap_t *ucm) copyin(ucm->entry, cm->entry, sizeof (u_long) * ucm->size)) == 0) && (vu->view == NULL || grf_use_colormap(vu->view, cm))) error = EINVAL; - free(cm, M_IOCTLOPS); + free(cm, M_TEMP); return(error); } diff --git a/sys/arch/atari/dev/view.c b/sys/arch/atari/dev/view.c index 9b25bde17a42..03ccd3fcb2ca 100644 --- a/sys/arch/atari/dev/view.c +++ b/sys/arch/atari/dev/view.c @@ -1,4 +1,4 @@ -/* $NetBSD: view.c,v 1.24 2007/03/04 05:59:41 christos Exp $ */ +/* $NetBSD: view.c,v 1.25 2008/03/23 15:50:51 cube Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -38,7 +38,7 @@ * a interface to graphics. */ #include -__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.24 2007/03/04 05:59:41 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.25 2008/03/23 15:50:51 cube Exp $"); #include #include @@ -254,7 +254,7 @@ colormap_t *ucm; return(EINVAL); /* add one incase of zero, ick. */ - cme = malloc(sizeof(ucm->entry[0])*(ucm->size+1), M_IOCTLOPS,M_WAITOK); + cme = malloc(sizeof(ucm->entry[0])*(ucm->size+1), M_TEMP,M_WAITOK); if (cme == NULL) return(ENOMEM); @@ -265,7 +265,7 @@ colormap_t *ucm; error = EINVAL; else error = copyout(cme, uep, sizeof(ucm->entry[0]) * ucm->size); ucm->entry = uep; /* set entry back to users. */ - free(cme, M_IOCTLOPS); + free(cme, M_TEMP); return(error); } @@ -280,7 +280,7 @@ colormap_t *ucm; if(ucm->size > MAX_CENTRIES) return(EINVAL); - cm = malloc(sizeof(ucm->entry[0])*ucm->size + sizeof(*cm), M_IOCTLOPS, + cm = malloc(sizeof(ucm->entry[0])*ucm->size + sizeof(*cm), M_TEMP, M_WAITOK); if(cm == NULL) return(ENOMEM); @@ -291,7 +291,7 @@ colormap_t *ucm; copyin(ucm->entry,cm->entry,sizeof(ucm->entry[0])*ucm->size)) == 0) && (vu->view == NULL || grf_use_colormap(vu->view, cm))) error = EINVAL; - free(cm, M_IOCTLOPS); + free(cm, M_TEMP); return(error); }