Skip to contentSkip to conversation

libtracefs: Fix enum type in read_event_state

PATCH New Ian Rogers 1 participant 1 message May 30, 2025

lore
Share & tools
lore

Ian Rogers

author
#0 lore raw

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).

---
 src/tracefs-events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/tracefs-events.c +1 -1
index 5515d15..1576153 100644
@@ -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