public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Irina Tirdea <irina.tirdea@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy
Date: Mon, 03 Sep 2012 10:09:14 +0900	[thread overview]
Message-ID: <87y5krewud.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <CANg8OW+Y3ZMG-GdhYu2_yKOYH_XEMgw73PdCX_23UTnfYhmttA@mail.gmail.com> (Irina Tirdea's message of "Wed, 29 Aug 2012 01:22:16 +0300")

On Wed, 29 Aug 2012 01:22:16 +0300, Irina Tirdea wrote:
> mempcpy is not supported by bionic in Android
> and will lead to compilation errors.
>
> Replacing mempcpy with memcpy so it will work in Android.

Unfortunately I've added another instance of the mempcpy in a
libtraceevent code. :-/

Thanks,
Namhyung


>
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> ---
>  tools/perf/util/target.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
> index 051eaa6..065528b 100644
> --- a/tools/perf/util/target.c
> +++ b/tools/perf/util/target.c
> @@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target
> *target, int errnum,
>
>  		if (err != buf) {
>  			size_t len = strlen(err);
> -			char *c = mempcpy(buf, err, min(buflen - 1, len));
> -			*c = '\0';
> +			memcpy(buf, err, min(buflen - 1, len));
> +			*(buf + min(buflen - 1, len)) = '\0';
>  		}
>
>  		return 0;

  reply	other threads:[~2012-09-03  1:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 22:22 [PATCH 11/13] perf tools: replace mempcpy with memcpy Irina Tirdea
2012-09-03  1:09 ` Namhyung Kim [this message]
2012-09-03 20:59   ` Irina Tirdea
2012-09-07  6:09 ` [tip:perf/core] perf tools: Replace " tip-bot for Irina Tirdea
     [not found] <CANg8OWLDxZTrhJ-M2aeLdV-+y0VuGR+3iro179V=LLTeeQi_CA@mail.gmail.com>
2012-09-05 22:38 ` [PATCH 11/13] perf tools: replace " Arnaldo Carvalho de Melo
2012-09-08  0:17   ` Irina Tirdea

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=87y5krewud.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=fweisbec@gmail.com \
    --cc=irina.tirdea@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.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