From: Mike F. <va...@ge...> - 2013-04-30 17:25:01
|
On Tuesday 30 April 2013 02:27:11 Alexey Kodanev wrote: > +/* LTP includes */ > +#include <test.h> > +#include <safe_macros.h> > +#include <usctest.h> use "" for LTP includes > +struct cleanup_list* clean_list_head; the * should be: struct cleanup_list *clean_list_head; this style error comes up a lot in this patch. please fix them all. > +void cleanup_add( void (*cleanup_fun)(void) ) it should be: void cleanup_add(void (*cleanup_fun)(void)) that said, this seems like overkill. why not declare a few vars and have your cleanup func process things based on that ? it avoids the ugliness of jumping around between random funcs. > + if(clean_list_head==NULL) { you need more spaces: if (clean_list_head == NULL) { this error comes up a lot. please fix globally. > + clean_list_head = (struct cleanup_list*)SAFE_MALLOC(NULL, > + sizeof(struct cleanup_list)); SAFE_MALLOC returns void*. there's no need to cast it. please fix globally. > + if(!first_call) return; it should be: if (!first_call) return; please fix globally. > + if(_root_cleanup) { > + SAFE_SETEGID(NULL,0); > + SAFE_SETEUID(NULL,0); more spacing issues: if (_root_cleanup) { SAFE_SETEGID(NULL, 0); SAFE_SETEUID(NULL, 0); i'm giving up now. seems like every line in your patch is broken. please clean it all up and resubmit. -mike |