[LTP] [PATCH 1/4] memcg_process_stress: cleanup

Cyril Hrubis chrubis@suse.cz
Wed May 11 16:16:54 CEST 2016


Hi!
> -void sigusr_handler(int __attribute__ ((unused)) signo)
> +static void sigusr_handler(int __attribute__ ((unused)) signo)
>  {
>  	int i;
>  	int pagesize;
>  
> -	pagesize = getpagesize();
> +	pagesize = sysconf(_SC_PAGE_SIZE);

Well sysconf() unlinek getpagesize() can fail and even if it's unlikely
with _SC_PAGE_SIZE this change may generate warnings in static analysis
of the code.

I would not bother and left the code with getpagesize() here.


Otherwise it's fine.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list