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

Joe Jin
2025-02-27T18:33:32Z

On 2/27/25 01:30, Karel Zak wrote:
> 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();
Will make change for this, thanks for your suggestions.

Thanks,
Joe