mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-26 02:20:51 +01:00
stand/ofw: dev can't be NULL here
dev can't be NULL here. ofw_common_parsedev is always called via devparse (indirectly through dv_parsedev() calls there which call it with the args unchanged). In the past, ofw_getdev could call us with NULL pointer for the parse-only case, but that's now all handled inside of devparse for simplicity. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D38041
This commit is contained in:
parent
d1ea501714
commit
d38d8a4c4e
@ -108,8 +108,7 @@ ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **path
|
||||
};
|
||||
strlcpy(idev->d_path, devspec, min(rem_path - devspec + 1,
|
||||
sizeof(idev->d_path)));
|
||||
if (dev != NULL)
|
||||
*dev = &idev->dd;
|
||||
*dev = &idev->dd;
|
||||
if (path != NULL)
|
||||
*path = rem_path;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user