mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 22:23:08 +00:00
altq: Stop checking for failures from malloc(M_WAITOK)
While here, prefer malloc(M_ZERO) over bzero(). MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852
This commit is contained in:
parent
3feb35dc46
commit
2a11988663
@ -1327,12 +1327,7 @@ acc_add_filter(classifier, filter, class, phandle)
|
||||
return (EINVAL);
|
||||
#endif
|
||||
|
||||
afp = malloc(sizeof(struct acc_filter),
|
||||
M_DEVBUF, M_WAITOK);
|
||||
if (afp == NULL)
|
||||
return (ENOMEM);
|
||||
bzero(afp, sizeof(struct acc_filter));
|
||||
|
||||
afp = malloc(sizeof(*afp), M_DEVBUF, M_WAITOK | M_ZERO);
|
||||
afp->f_filter = *filter;
|
||||
afp->f_class = class;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user