Re: [PATCH 3/3] lsirq,irqtop: add support for reading data from given file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 26, 2025 at 08:49:16PM GMT, Joe Jin wrote:
> +	if (ctl->input == NULL) {
> +		if (ctl->softirq == 1)
> +			ctl->input = strdup(_PATH_PROC_SOFTIRQS);
> +		else
> +			ctl->input = strdup(_PATH_PROC_INTERRUPTS);
> +		if (!ctl->input)
> +			err_oom();
> +	}

 Please, use xstrdup(), than you do not need to care about result and
 use err_oom();

    Karel
-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com





[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux