diff options
| author | Warner Losh <imp@FreeBSD.org> | 2025-09-02 15:21:45 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2025-09-02 15:23:02 +0000 |
| commit | dd747d7bcb808eb18385a527163054c874aa3c27 (patch) | |
| tree | 56d22c49e57f8dd08cd8a873845ea7c889046b69 | |
| parent | 8ebb3de0c9dfb1a15bf24dcb0ca65cc91e7ad0e8 (diff) | |
Revert "stand: Use calloc instead of malloc for initialization of filesystem devsw"
This reverts commit dfafdbdfc3e9db8b878283bcbef35f5d8d37dae8. There's no
author, and also problems with it. I'll redo it.
Sponsored by: Netflix
| -rw-r--r-- | stand/common/disk.c | 2 | ||||
| -rw-r--r-- | stand/kboot/kboot/hostdisk.c | 2 | ||||
| -rw-r--r-- | stand/libofw/devicename.c | 2 | ||||
| -rw-r--r-- | stand/libsa/dev.c | 2 | ||||
| -rw-r--r-- | stand/libsa/zfs/zfs.c | 2 | ||||
| -rw-r--r-- | stand/uboot/devicename.c | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/stand/common/disk.c b/stand/common/disk.c index 1baf91efaa49..c1650f0fa1ec 100644 --- a/stand/common/disk.c +++ b/stand/common/disk.c @@ -468,7 +468,7 @@ disk_parsedev(struct devdesc **idev, const char *devspec, const char **path) if (*cp != '\0' && *cp != ':') return (EINVAL); - dev = calloc(sizeof(*dev), 1); + dev = malloc(sizeof(*dev)); if (dev == NULL) return (ENOMEM); dev->dd.d_unit = unit; diff --git a/stand/kboot/kboot/hostdisk.c b/stand/kboot/kboot/hostdisk.c index fc98bf534519..a9117d4c1c9d 100644 --- a/stand/kboot/kboot/hostdisk.c +++ b/stand/kboot/kboot/hostdisk.c @@ -465,7 +465,7 @@ hostdisk_parsedev(struct devdesc **idev, const char *devspec, const char **path) return (EINVAL); } free(fn); - dev = calloc(sizeof(*dev), 1); + dev = malloc(sizeof(*dev)); if (dev == NULL) return (ENOMEM); dev->d_unit = 0; diff --git a/stand/libofw/devicename.c b/stand/libofw/devicename.c index 46a9717fdda5..f6419632c6bc 100644 --- a/stand/libofw/devicename.c +++ b/stand/libofw/devicename.c @@ -98,7 +98,7 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path if (ofw_path_to_handle(devspec, ofwtype, &rem_path) == -1) return (ENOENT); - idev = calloc(sizeof(struct ofw_devdesc), 1); + idev = malloc(sizeof(struct ofw_devdesc)); if (idev == NULL) { printf("ofw_parsedev: malloc failed\n"); return (ENOMEM); diff --git a/stand/libsa/dev.c b/stand/libsa/dev.c index 4f6932e96c48..1edc843d508c 100644 --- a/stand/libsa/dev.c +++ b/stand/libsa/dev.c @@ -72,7 +72,7 @@ default_parsedev(struct devdesc **dev, const char *devspec, int unit, err; char *cp; - idev = calloc(sizeof(struct devdesc), 1); + idev = malloc(sizeof(struct devdesc)); if (idev == NULL) return (ENOMEM); diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 2f7c1caaa4b5..70a102f6425d 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -1643,7 +1643,7 @@ zfs_parsedev(struct devdesc **idev, const char *devspec, const char **path) spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - dev = calloc(sizeof(*dev), 1); + dev = malloc(sizeof(*dev)); if (dev == NULL) return (ENOMEM); dev->pool_guid = spa->spa_guid; diff --git a/stand/uboot/devicename.c b/stand/uboot/devicename.c index 23670d7593a2..4ee9c7fd72c4 100644 --- a/stand/uboot/devicename.c +++ b/stand/uboot/devicename.c @@ -102,7 +102,7 @@ uboot_parsedev(struct uboot_devdesc **dev, const char *devspec, } if (dv == NULL) return(ENOENT); - idev = calloc(sizeof(struct uboot_devdesc), 1); + idev = malloc(sizeof(struct uboot_devdesc)); err = 0; np = (devspec + strlen(dv->dv_name)); |
