qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: kvm@vger.kernel.org, john cooper <john.cooper@redhat.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org,
	Ryan Harper <ryanh@us.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] Add 'serial' attribute to virtio-blk devices
Date: Sat, 19 Jun 2010 03:58:35 -0700	[thread overview]
Message-ID: <4C1CA2DB.2080502@redhat.com> (raw)
In-Reply-To: <AANLkTin7WwGhL-O4ENzG6u-2q0pYiLpyH1tfzLUxK4PQ@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/19/2010 01:24 AM, Blue Swirl wrote:
>> +static inline int serial_sysfs(char *d, char *s, int n)
>> +{
>> +       char *di = d;
> 
> I'd change this to:
> static inline ssize_t serial_sysfs(char *d, const char *s, ssize_t n)
> {
>        const char *di = d;
> 
>> +
>> +       while (*s && n--)
>> +               *d++ = *s++;
>> +       return d - di;

I would guess you mean

   char *const di = d;

Quite different and doesn't elicit warnings from the compiler.

- -- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkwcotsACgkQ2ijCOnn/RHQLowCgqmoJCFjfh/ySP4/PQAWKmKJ9
rAwAn1O1L3hb2nzd7altEWT/PXg8oecx
=YkfO
-----END PGP SIGNATURE-----

  reply	other threads:[~2010-06-19 10:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18 18:38 [Qemu-devel] [PATCH 1/2] Add 'serial' attribute to virtio-blk devices Ryan Harper
2010-06-18 18:38 ` [Qemu-devel] [PATCH 2/2] Remove virtio_blk VBID ioctl Ryan Harper
2010-06-21  1:30   ` [Qemu-devel] " Rusty Russell
2010-06-21  2:30     ` Ryan Harper
2010-06-21  5:07     ` john cooper
2010-06-19  8:24 ` [Qemu-devel] [PATCH 1/2] Add 'serial' attribute to virtio-blk devices Blue Swirl
2010-06-19 10:58   ` Ulrich Drepper [this message]
2010-06-19 15:59     ` Blue Swirl
2010-06-21  1:52 ` [Qemu-devel] " Rusty Russell
2010-06-21  5:51   ` john cooper
2010-06-21 16:43     ` Ryan Harper
2010-06-21 17:11       ` john cooper
2010-06-21 23:25       ` Rusty Russell
2010-06-22  3:40         ` john cooper
2010-06-21 12:44 ` [Qemu-devel] " Christoph Hellwig
2010-06-21 16:45   ` Ryan Harper

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=4C1CA2DB.2080502@redhat.com \
    --to=drepper@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=john.cooper@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    --cc=ryanh@us.ibm.com \
    --cc=virtualization@lists.linux-foundation.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;
as well as URLs for NNTP newsgroup(s).