From: Dan Carpenter <dan.carpenter@oracle.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jens Axboe <axboe@kernel.dk>, Jeff Moyer <jmoyer@redhat.com>,
Ramprasad Chinthekindi <rchinthekindi@stec-inc.com>,
Akhil Bhansali <abhansali@stec-inc.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [patch 3/4] skd: use strncpy() as a cleanup
Date: Fri, 13 Sep 2013 12:56:05 +0000 [thread overview]
Message-ID: <20130913125605.GL25896@mwanda> (raw)
In-Reply-To: <CAMuHMdX88cUEu2dmamEttK=9Lv0TKiZauCtPDLbgKUde+8ufyQ@mail.gmail.com>
On Fri, Sep 13, 2013 at 02:03:23PM +0200, Geert Uytterhoeven wrote:
> On Fri, Sep 13, 2013 at 10:05 AM, Dan Carpenter
> > + strncpy(inq.driver_version, DRV_VER_COMPL,
> > + min(sizeof(inq.driver_version), strlen(DRV_VER_COMPL)));
>
> This does the exact same thing as memcpy(), right? So why not use that?
> memcpy() has much simpler semantics than strncpy().
You're right. I've redone this.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jens Axboe <axboe@kernel.dk>, Jeff Moyer <jmoyer@redhat.com>,
Ramprasad Chinthekindi <rchinthekindi@stec-inc.com>,
Akhil Bhansali <abhansali@stec-inc.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [patch 3/4] skd: use strncpy() as a cleanup
Date: Fri, 13 Sep 2013 15:56:05 +0300 [thread overview]
Message-ID: <20130913125605.GL25896@mwanda> (raw)
In-Reply-To: <CAMuHMdX88cUEu2dmamEttK=9Lv0TKiZauCtPDLbgKUde+8ufyQ@mail.gmail.com>
On Fri, Sep 13, 2013 at 02:03:23PM +0200, Geert Uytterhoeven wrote:
> On Fri, Sep 13, 2013 at 10:05 AM, Dan Carpenter
> > + strncpy(inq.driver_version, DRV_VER_COMPL,
> > + min(sizeof(inq.driver_version), strlen(DRV_VER_COMPL)));
>
> This does the exact same thing as memcpy(), right? So why not use that?
> memcpy() has much simpler semantics than strncpy().
You're right. I've redone this.
regards,
dan carpenter
next prev parent reply other threads:[~2013-09-13 12:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 8:05 [patch 3/4] skd: use strncpy() as a cleanup Dan Carpenter
2013-09-13 8:05 ` Dan Carpenter
2013-09-13 12:03 ` Geert Uytterhoeven
2013-09-13 12:03 ` Geert Uytterhoeven
2013-09-13 12:53 ` [patch 3/4 v2] skd: use memcpy() " Dan Carpenter
2013-09-13 12:53 ` Dan Carpenter
2013-09-13 12:56 ` Dan Carpenter [this message]
2013-09-13 12:56 ` [patch 3/4] skd: use strncpy() " Dan Carpenter
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=20130913125605.GL25896@mwanda \
--to=dan.carpenter@oracle.com \
--cc=abhansali@stec-inc.com \
--cc=axboe@kernel.dk \
--cc=geert@linux-m68k.org \
--cc=jmoyer@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rchinthekindi@stec-inc.com \
/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.