Message ID | 20181121151356.16901-4-ykaradzhov@vmware.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | Small modifications and bug fixes toward KS 1.0 | expand |
diff --git a/kernel-shark-qt/src/libkshark.c b/kernel-shark-qt/src/libkshark.c index 1a39968..fa85171 100644 --- a/kernel-shark-qt/src/libkshark.c +++ b/kernel-shark-qt/src/libkshark.c @@ -1111,7 +1111,7 @@ int kshark_get_event_id_easy(struct kshark_entry *entry) free_record(data); } - return (event_id == -1)? EFAULT : event_id; + return (event_id == -1)? -EFAULT : event_id; } /** @@ -1133,7 +1133,7 @@ const char *kshark_get_event_name_easy(struct kshark_entry *entry) struct tep_event_format *event; int event_id = kshark_get_event_id_easy(entry); - if (event_id == EFAULT) + if (event_id == -EFAULT) return NULL; kshark_instance(&kshark_ctx);
This patch fixes a simple bug in kshark_get_event_id_easy(). All returned error codes must be negative. Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com> --- kernel-shark-qt/src/libkshark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)