stand: dev can't be NULL in default_prasedev
We pass in the address of a variable to store this value always in the only place that calls this function, so there is no need to test for NULL. Sponsored by: Netflix Notied by: tsoome in D38041
This commit is contained in:
parent
92e978439f
commit
4883f347f6
@ -100,10 +100,7 @@ default_parsedev(struct devdesc **dev, const char *devspec,
|
||||
idev->d_unit = unit;
|
||||
if (path != NULL)
|
||||
*path = (*cp == 0) ? cp : cp + 1;
|
||||
if (dev != NULL) /* maybe this can be required? */
|
||||
*dev = idev;
|
||||
else
|
||||
free(idev);
|
||||
*dev = idev;
|
||||
return (0);
|
||||
fail:
|
||||
free(idev);
|
||||
|
Loading…
Reference in New Issue
Block a user