kernel: simplify sysnotify; should fix CID 156151 (Wrong sizeof argument)
This commit is contained in:
parent
17c9087965
commit
b056df2da6
@ -689,16 +689,13 @@ syserrstr(char* err, int nerr)
|
||||
int
|
||||
sysnotify(void* a0)
|
||||
{
|
||||
void (*f)(void*, char*);
|
||||
if(a0 != nil)
|
||||
validaddr(a0, sizeof(void*), 0);
|
||||
|
||||
/*
|
||||
* int notify(void (*f)(void*, char*));
|
||||
*/
|
||||
f = (void (*)(void*, char*))a0;
|
||||
|
||||
if(f != nil)
|
||||
validaddr(f, sizeof(void (*)(void*, char*)), 0);
|
||||
up->notify = f;
|
||||
up->notify = (void (*)(void*, char*))a0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user