]> granicus.if.org Git - sysstat/commit
Better handling of get_activity_position() return value
authorSebastien GODARD <sysstat@users.noreply.github.com>
Tue, 27 Jan 2015 11:23:50 +0000 (12:23 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Tue, 27 Jan 2015 11:23:50 +0000 (12:23 +0100)
commit949c0a1ba93df28d037d68d7fd0a7dffd944d92d
tree334382d9385b82bfc7b384542a8c4eb39a6929a4
parent076eccb9c90abe99cef1cd5f7ab63d1db3bcd003
Better handling of get_activity_position() return value

Function get_activity_position() can return -1 on error, ie. when
corresponding activity hasn't been found in array.
This return code was sometimes not tested because we knew that the
activity existed. So we directly used the return code as array index.
Strengthen things now: If such an activity is not found then display an
internal error message and exit.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
common.c
common.h
sa.h
sa_common.c
sa_conv.c
sadc.c
sadf.c
sadf_misc.c
sar.c