File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,13 @@ struct eventhook {
6666 s32 fd ;
6767 u32 event_code ;
6868 stmcallback callback ;
69- enum { EVENTHOOK_UNSET = 0 , EVENTHOOK_SET } state ;
69+ enum { EVENTHOOK_UNSET , EVENTHOOK_SET } state ;
7070};
7171
72- static struct eventhook __stm_eventhook ;
72+ static struct eventhook __stm_eventhook = {
73+ .fd = -1 ,
74+ .state = EVENTHOOK_UNSET ,
75+ };
7376
7477static s32 __STMEventCallback (s32 result ,void * usrdata );
7578s32 __STM_SetEventHook (void );
@@ -157,7 +160,7 @@ static s32 __STMEventCallback(s32 result, void *usrdata)
157160 STM_printf ("event=%08x\n" , __stm_eventhook .event_code );
158161
159162 if (__stm_eventhook .event_code == 0 ) { // Release
160- return 0 ;
163+ return result ;
161164 }
162165 else {
163166 if (__stm_eventhook .callback )
You can’t perform that action at this time.
0 commit comments