DESCRIPTION

lttng: Fix off-by-one in the check for new attributes

In some places, we want to check if a get*AndAdd() call just
created an attribute, or re-used an existing one. The correct
way to check for this is if (quark == ss.getNbAttributes() - 1).
The -1 was missing.

Since this test comes relatively often, also add a specific method
to the interface, so it makes the code clearer.

Change-Id: Idc3f9a508cd670914236bce603e1d5202787a46c
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Ivy Mitchell
date: 2012-08-03 19:18:26.000000000

Patch Set 1: Looks good to me, but someone else must approve; IP review completed

Looks good. This will allow the creation of synthetic states.

-------------------------------------
author: Braxton Mccarthy
date: 2012-08-06 18:07:07.000000000

Patch Set 1: Verified; Looks good to me, approved



-------------------------------------
author: Braxton Mccarthy
date: 2012-08-06 18:07:07.000000000

Change has been successfully cherry-picked

-------------------------------------
