Re: [PATCH] tools lib traceevent: Fix off-by-one bug in pevent_strerror()

2012-08-23 Thread Namhyung Kim
Hi, Steve On Thu, 23 Aug 2012 05:30:23 -0400, Steven Rostedt wrote: > On Thu, 2012-08-23 at 16:37 +0900, Namhyung Kim wrote: >> From: Namhyung Kim >> >> As pevent_errno is defined using PEVENT_ERRORS which uses _PE macro >> magic, the first errno is bigger than __PEVENT_ERRNO_START by 1. So we >

Re: [PATCH] tools lib traceevent: Fix off-by-one bug in pevent_strerror()

2012-08-23 Thread Steven Rostedt
On Thu, 2012-08-23 at 16:37 +0900, Namhyung Kim wrote: > From: Namhyung Kim > > As pevent_errno is defined using PEVENT_ERRORS which uses _PE macro > magic, the first errno is bigger than __PEVENT_ERRNO_START by 1. So we > need to subtract the 1 also when calculating the index of the error > stri

[PATCH] tools lib traceevent: Fix off-by-one bug in pevent_strerror()

2012-08-23 Thread Namhyung Kim
From: Namhyung Kim As pevent_errno is defined using PEVENT_ERRORS which uses _PE macro magic, the first errno is bigger than __PEVENT_ERRNO_START by 1. So we need to subtract the 1 also when calculating the index of the error strings. Cc: Fredereic Weisbecker Cc: Steven Rostedt Signed-off-by: