libtracefs: Fix enum type in read_event_state
PATCH 1/1 libtracefs: Fix enum type in read_event_state
The state variable is of type event_state but is assigned TRACEFS_ERROR(-1) of type tracefs_enable_state which has no corresponding event_state name. Fix this by assigning STATE_ERROR(4).
Reported-by Asmaa AbdelGhany <[email protected]>
Signed-off-by Ian Rogers <[email protected]>
--- src/tracefs-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/tracefs-events.c +1 -1
@@ -1459,7 +1459,7 @@ static int read_event_state(struct tracefs_instance *instance, const char *file, *state =STATE_MIXED ;break ;default : - *state =TRACEFS_ERROR ; + *state =STATE_ERROR ; ret =-1 ;break ; }
Signature · 1 line
2.49.0.1204.g71687c7c1d-goog