summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-10-29 15:47:16 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-10-29 15:47:16 +0000
commit7d9d396fd545532b28c0dea8ef9f385b4fff4578 (patch)
treeb0111113d7d91dcd25f09237023149e8ffd0f996 /sys/dev/aic7xxx
parentf8eaa3d8016b5b89b5f98f3e579e75ed926fc118 (diff)
downloadFreeBSD-src-7d9d396fd545532b28c0dea8ef9f385b4fff4578.zip
FreeBSD-src-7d9d396fd545532b28c0dea8ef9f385b4fff4578.tar.gz
Add the use of M_ZERO to some malloc calls.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: gibbs
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r--sys/dev/aic7xxx/aic7xxx_freebsd.c5
-rw-r--r--sys/dev/aic7xxx/aic7xxx_osm.c5
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx_freebsd.c b/sys/dev/aic7xxx/aic7xxx_freebsd.c
index 4ca846c..31ae3a5 100644
--- a/sys/dev/aic7xxx/aic7xxx_freebsd.c
+++ b/sys/dev/aic7xxx/aic7xxx_freebsd.c
@@ -1795,11 +1795,10 @@ ahc_platform_set_tags(struct ahc_softc *ahc,
int
ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg)
{
- ahc->platform_data =
- malloc(sizeof(struct ahc_platform_data), M_DEVBUF, M_NOWAIT);
+ ahc->platform_data = malloc(sizeof(struct ahc_platform_data), M_DEVBUF,
+ M_NOWAIT | M_ZERO);
if (ahc->platform_data == NULL)
return (ENOMEM);
- memset(ahc->platform_data, 0, sizeof(struct ahc_platform_data));
return (0);
}
diff --git a/sys/dev/aic7xxx/aic7xxx_osm.c b/sys/dev/aic7xxx/aic7xxx_osm.c
index 4ca846c..31ae3a5 100644
--- a/sys/dev/aic7xxx/aic7xxx_osm.c
+++ b/sys/dev/aic7xxx/aic7xxx_osm.c
@@ -1795,11 +1795,10 @@ ahc_platform_set_tags(struct ahc_softc *ahc,
int
ahc_platform_alloc(struct ahc_softc *ahc, void *platform_arg)
{
- ahc->platform_data =
- malloc(sizeof(struct ahc_platform_data), M_DEVBUF, M_NOWAIT);
+ ahc->platform_data = malloc(sizeof(struct ahc_platform_data), M_DEVBUF,
+ M_NOWAIT | M_ZERO);
if (ahc->platform_data == NULL)
return (ENOMEM);
- memset(ahc->platform_data, 0, sizeof(struct ahc_platform_data));
return (0);
}
OpenPOWER on IntegriCloud