diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
commit | 1ede983cc905643549d8cae56a9d0e28fc68375f (patch) | |
tree | 21e792ce590e1bcf9b343890605a1b4c6a9016b3 /sys/compat/linux/linux_util.c | |
parent | 994f9863852fe65833509090659d9f5aef7194d3 (diff) |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
Notes
Notes:
svn path=/head/; revision=184205
Diffstat (limited to 'sys/compat/linux/linux_util.c')
-rw-r--r-- | sys/compat/linux/linux_util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c index 51a0ec3c947b..3412c370b419 100644 --- a/sys/compat/linux/linux_util.c +++ b/sys/compat/linux/linux_util.c @@ -165,7 +165,7 @@ linux_get_char_devices() char formated[256]; int current_size = 0, string_size = 1024; - MALLOC(string, char *, string_size, M_LINUX, M_WAITOK); + string = malloc(string_size, M_LINUX, M_WAITOK); string[0] = '\000'; last = ""; TAILQ_FOREACH(de, &devices, list) { @@ -181,10 +181,10 @@ linux_get_char_devices() if (strlen(formated) + current_size >= string_size) { string_size *= 2; - MALLOC(string, char *, string_size, + string = malloc(string_size, M_LINUX, M_WAITOK); bcopy(temp, string, current_size); - FREE(temp, M_LINUX); + free(temp, M_LINUX); } strcat(string, formated); current_size = strlen(string); @@ -197,7 +197,7 @@ linux_get_char_devices() void linux_free_get_char_devices(char *string) { - FREE(string, M_LINUX); + free(string, M_LINUX); } static int linux_major_starting = 200; @@ -210,7 +210,7 @@ linux_device_register_handler(struct linux_device_handler *d) if (d == NULL) return (EINVAL); - MALLOC(de, struct device_element *, sizeof(*de), + de = malloc(sizeof(*de), M_LINUX, M_WAITOK); if (d->linux_major < 0) { d->linux_major = linux_major_starting++; @@ -234,7 +234,7 @@ linux_device_unregister_handler(struct linux_device_handler *d) TAILQ_FOREACH(de, &devices, list) { if (bcmp(d, &de->entry, sizeof(*d)) == 0) { TAILQ_REMOVE(&devices, de, list); - FREE(de, M_LINUX); + free(de, M_LINUX); return (0); } } |