From: Joe Jin <joe.jin@oracle.com>
To: Karel Zak <kzak@redhat.com>
Cc: Zhenwei Pi <pizhenwei@bytedance.com>,
Sami Kerola <kerolasa@iki.fi>,
util-linux@vger.kernel.org
Subject: Re: [PATCH 3/3] lsirq,irqtop: add support for reading data from given file
Date: Thu, 27 Feb 2025 10:33:13 -0800 [thread overview]
Message-ID: <f1cb79fe-eb9f-4895-950b-50711408a02d@oracle.com> (raw)
In-Reply-To: <tzkpkjopbtqlpmeic2xoephezgfl63xa5e4eytycmg24cbnx4q@qamwltb7ol6y>
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
next prev parent reply other threads:[~2025-02-27 18:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-27 4:49 [PATCH 0/3] irqtop,lsirq: Miscellaneous enhancements Joe Jin
2025-02-27 4:49 ` [PATCH 1/3] irqtop: add batch mode support Joe Jin
2025-02-27 9:25 ` Karel Zak
2025-02-27 18:30 ` Joe Jin
2025-02-28 1:34 ` zhenwei pi
2025-02-28 4:24 ` Joe Jin
2025-02-27 4:49 ` [PATCH 2/3] irqtop: add max iteration support Joe Jin
2025-02-27 9:28 ` Karel Zak
2025-02-27 18:32 ` Joe Jin
2025-02-28 8:19 ` Karel Zak
2025-02-27 4:49 ` [PATCH 3/3] lsirq,irqtop: add support for reading data from given file Joe Jin
2025-02-27 9:30 ` Karel Zak
2025-02-27 18:33 ` Joe Jin [this message]
2025-02-28 1:41 ` zhenwei pi
2025-02-28 4:25 ` Joe Jin
2025-02-27 7:36 ` [PATCH 0/3] irqtop,lsirq: Miscellaneous enhancements Sami Kerola
2025-02-27 19:49 ` Joe Jin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f1cb79fe-eb9f-4895-950b-50711408a02d@oracle.com \
--to=joe.jin@oracle.com \
--cc=kerolasa@iki.fi \
--cc=kzak@redhat.com \
--cc=pizhenwei@bytedance.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox