On Mon, Dec 22, 2008 at 04:17:34PM +0530, Sudhir Kumar wrote: > On Mon, Dec 22, 2008 at 02:51:28PM +0530, Dhaval Giani wrote: > > On Thu, Dec 18, 2008 at 06:24:36PM +0530, Sudhir Kumar wrote: > > > This patch adds few more warning messages in the message pool > > > > > > Signed-off-by: Sudhir Kumar <[email protected]> > > > > > > Index: balbir-latest/tests/libcgrouptest01.c > > > =================================================================== > > > --- balbir-latest.orig/tests/libcgrouptest01.c > > > +++ balbir-latest/tests/libcgrouptest01.c > > > @@ -1347,36 +1347,42 @@ void set_info_msgs() > > > " groups\n", SIZE); > > > break; > > > case 7: > > > + strncpy(info[k], " group found in filesystem\n", SIZE); > > > + break; > > > > what is k? Does this even work? > k is the value of the switch statement and it is an index to the array > char *info[k].
Ah sorry. Lack of sleep talking there :). The code is correct, I missed the braces. But one question, why not a static array? -- regards, Dhaval ------------------------------------------------------------------------------ _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
