From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH 1/2] devlist: Remove an unnecessary sprintf
Date: Tue, 18 Sep 2012 18:16:43 +0300 [thread overview]
Message-ID: <20120918151643.GA3046@swordfish.minsk.epam.com> (raw)
In-Reply-To: 1347981198-10438-1-git-send-email-namhyung@gmail.com
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
On (09/19/12 00:13), Namhyung Kim wrote:
> Date: Wed, 19 Sep 2012 00:13:17 +0900
> From: Namhyung Kim <namhyung(a)gmail.com>
> To: powertop(a)lists.01.org
> Subject: [Powertop] [PATCH 1/2] devlist: Remove an unnecessary sprintf
> X-Mailer: git-send-email 1.7.9.2
>
> The 'filename' is not used in the loop anymore.
>
> Signed-off-by: Namhyung Kim <namhyung(a)gmail.com>
> ---
> src/devlist.cpp | 1 -
> 1 file changed, 1 deletion(-)
>
looks good.
-ss
> diff --git a/src/devlist.cpp b/src/devlist.cpp
> index 5ec0a8b..828f47f 100644
> --- a/src/devlist.cpp
> +++ b/src/devlist.cpp
> @@ -147,7 +147,6 @@ void collect_open_devices(void)
> continue;
> dev->pid = strtoull(entry->d_name, NULL, 10);
> strncpy(dev->device, link, 251);
> - sprintf(filename, "/proc/%s/comm", entry->d_name);
> strncpy(dev->comm, read_sysfs_string("/proc/%s/comm", entry->d_name).c_str(), 31);
> target->push_back(dev);
>
> --
> 1.7.9.2
>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>
next reply other threads:[~2012-09-18 15:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 15:16 Sergey Senozhatsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-09-18 15:42 [Powertop] [PATCH 1/2] devlist: Remove an unnecessary sprintf Chris Ferron
2012-09-18 15:13 Namhyung Kim
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=20120918151643.GA3046@swordfish.minsk.epam.com \
--to=powertop@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.