From 076d63698c204427b210a2da76dc1b7e6640bbb9 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 1 Feb 2008 14:20:00 -0500 Subject: when a parsing error occurs don't return an empty event --- tools/ck-history.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/ck-history.c b/tools/ck-history.c index 8f96a9b..716c3ef 100644 --- a/tools/ck-history.c +++ b/tools/ck-history.c @@ -566,11 +566,11 @@ generate_report_last (int uid, continue; } - if (seat != NULL && strcmp (e->seat_id, seat) != 0) { + if (seat != NULL && e->seat_id != NULL && strcmp (e->seat_id, seat) != 0) { continue; } - if (session_type != NULL && strcmp (e->session_type, session_type) != 0) { + if (session_type != NULL && e->session_type != NULL && strcmp (e->session_type, session_type) != 0) { continue; } } @@ -609,11 +609,11 @@ generate_report_last_compat (int uid, continue; } - if (seat != NULL && strcmp (e->seat_id, seat) != 0) { + if (seat != NULL && e->seat_id != NULL && strcmp (e->seat_id, seat) != 0) { continue; } - if (session_type != NULL && strcmp (e->session_type, session_type) != 0) { + if (session_type != NULL && e->session_type != NULL && strcmp (e->session_type, session_type) != 0) { continue; } } @@ -689,11 +689,11 @@ generate_report_frequent (int uid, continue; } - if (seat != NULL && strcmp (e->seat_id, seat) != 0) { + if (seat != NULL && e->seat_id != NULL && strcmp (e->seat_id, seat) != 0) { continue; } - if (session_type != NULL && strcmp (e->session_type, session_type) != 0) { + if (session_type != NULL && e->session_type != NULL && strcmp (e->session_type, session_type) != 0) { continue; } -- cgit