diff options
| author | Matt Jacob <mjacob@FreeBSD.org> | 2000-10-27 16:36:26 +0000 |
|---|---|---|
| committer | Matt Jacob <mjacob@FreeBSD.org> | 2000-10-27 16:36:26 +0000 |
| commit | 657e6b0d78398585bf718f2d6004510fe8d6415b (patch) | |
| tree | f721b3e55e7d3242b23f92803d191aabc0a7f84e /sys | |
| parent | f2998370b7562cff84f0235b17c8d0589c0ba047 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/alpha/alpha/interrupt.c | 7 | ||||
| -rw-r--r-- | sys/alpha/osf1/imgact_osf1.c | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sys/alpha/alpha/interrupt.c b/sys/alpha/alpha/interrupt.c index 2df48a2095340..5a75fcbd25b80 100644 --- a/sys/alpha/alpha/interrupt.c +++ b/sys/alpha/alpha/interrupt.c @@ -371,11 +371,11 @@ alpha_setup_intr(const char *name, int vector, driver_intr_t *handler, if (ithd == NULL || ithd->it_ih == NULL) { /* first handler for this vector */ if (ithd == NULL) { - ithd = malloc(sizeof(struct ithd), M_DEVBUF, M_WAITOK); + ithd = malloc(sizeof(struct ithd), M_DEVBUF, + M_WAITOK | M_ZERO); if (ithd == NULL) return ENOMEM; - bzero(ithd, sizeof(struct ithd)); ithd->irq = vector; ithd->it_md = i; i->ithd = ithd; @@ -410,10 +410,9 @@ alpha_setup_intr(const char *name, int vector, driver_intr_t *handler, } /* Third, setup the interrupt descriptor for this handler. */ - idesc = malloc(sizeof (struct intrhand), M_DEVBUF, M_WAITOK); + idesc = malloc(sizeof (struct intrhand), M_DEVBUF, M_WAITOK | M_ZERO); if (idesc == NULL) return ENOMEM; - bzero(idesc, sizeof(struct intrhand)); idesc->ih_handler = handler; idesc->ih_argument = arg; diff --git a/sys/alpha/osf1/imgact_osf1.c b/sys/alpha/osf1/imgact_osf1.c index f88ab284d5275..f7bf971c197c6 100644 --- a/sys/alpha/osf1/imgact_osf1.c +++ b/sys/alpha/osf1/imgact_osf1.c @@ -109,8 +109,7 @@ exec_osf1_imgact(struct image_params *imgp) printf("unknown ecoff magic %x\n", eap->magic); return ENOEXEC; } - osf_auxargs = malloc(sizeof(Osf_Auxargs), M_TEMP, M_WAITOK); - bzero(osf_auxargs, sizeof(Osf_Auxargs)); + osf_auxargs = malloc(sizeof(Osf_Auxargs), M_TEMP, M_WAITOK | M_ZERO); imgp->auxargs = osf_auxargs; osf_auxargs->executable = osf_auxargs->exec_path; path_not_saved = copyinstr(imgp->fname, osf_auxargs->executable, @@ -226,8 +225,7 @@ exec_osf1_imgact(struct image_params *imgp) raw_dend = (eap->data_start + eap->dsize); if (dend > raw_dend) { caddr_t zeros; - zeros = malloc(dend-raw_dend,M_TEMP,M_WAITOK); - bzero(zeros,dend-raw_dend); + zeros = malloc(dend-raw_dend,M_TEMP,M_WAITOK|M_ZERO); if ((error = copyout(zeros, (caddr_t)raw_dend, dend-raw_dend))) { uprintf("Can't zero start of bss, error %d\n",error); |
