mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-04 12:54:20 +01:00
WINGs: Removed cast to change function prototype
When a function is used as a call-back, it is dangerous to have arguments with a type different than what is expected by the call-back definition. This patch sets the argument list to match what is expected by the call-back prototype and inserts an explicit type conversion at the beginning of the function.
This commit is contained in:
committed by
Carlos R. Mafra
parent
bab90b2168
commit
e2d816c7a2
@@ -80,10 +80,12 @@ void WMCreateEventHandler(WMView * view, unsigned long mask, WMEventProc * event
|
||||
|
||||
static int matchHandler(const void *item, const void *cdata)
|
||||
{
|
||||
#define H1 ((W_EventHandler*)item)
|
||||
#define H2 ((W_EventHandler*)cdata)
|
||||
const W_EventHandler *h1 = item;
|
||||
const W_EventHandler *h2 = cdata;
|
||||
|
||||
return (H1->eventMask == H2->eventMask && H1->proc == H2->proc && H1->clientData == H2->clientData);
|
||||
return ((h1->eventMask == h2->eventMask) &&
|
||||
(h1->proc == h2->proc) &&
|
||||
(h1->clientData == h2->clientData));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user