]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
libcgroup Test: libcgroup-add-static-array-for-testcase-info-messages
authorBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 17 Dec 2008 15:17:57 +0000 (15:17 +0000)
committerBalbir Singh <balbir@linux.vnet.ibm.com>
Wed, 17 Dec 2008 15:17:57 +0000 (15:17 +0000)
commitdef5595456cbf96de855ba8d69c8e46e16f2f9c4
treec8a1d281dc7c883e055622f9edbb5db9c69fe06d
parent1a61c6f7fb1fb2b9f0092408e024dce34cc49900
libcgroup Test: libcgroup-add-static-array-for-testcase-info-messages

This patch removes all the strncpy() calls that were made before each api
call to print the info messages. This patch creates an array of such info
messages, initialize them, and then frees them with the help of two functions
set_info_msgs(), called at start and free_info_msgs() called at end. The
main motto has been to avoid the global variables due to thread safety reasons.

Signed-off-by:  Sudhir Kumar  <skumar@linux.vnet.ibm.com>

git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@266 4f4bb910-9a46-0410-90c8-c897d4f1cd53
tests/libcgrouptest.h
tests/libcgrouptest01.c