linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Lovenberg <scott.lovenberg@gmail.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: steved@redhat.com, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 7/6] nfsdcltrack: add a legacy transition mechanism
Date: Wed, 3 Oct 2012 09:52:02 -0400	[thread overview]
Message-ID: <CAFB9KM3xDcvth1pOg-eDAPzM7Gu48A_ExY9vUk0Sb524aencGA@mail.gmail.com> (raw)
In-Reply-To: <20121003094035.1f7245a4@tlielax.poochiereds.net>

On Wed, Oct 3, 2012 at 9:40 AM, Jeff Layton <jlayton@redhat.com> wrote:
> On Wed, 3 Oct 2012 09:34:36 -0400
> Scott Lovenberg <scott.lovenberg@gmail.com> wrote:
>
>> On Wed, Oct 3, 2012 at 8:42 AM, Jeff Layton <jlayton@redhat.com> wrote:
>> [snip]
>> > +               /* if there's a problem, then skip this entry */
>> > +               if (len < 0 || (size_t)len >= sizeof(blob)) {
>> > +                       xlog(L_WARNING, "%s: unable to build filename for %s!",
>> > +                               __func__, entry->d_name);
>> > +                       continue;
>> > +               }
>>
>> Is a len == 0 not a problem?
>>
>
> I'm not sure -- under what circumstances would it return 0?
>
> --
> Jeff Layton <jlayton@redhat.com>

I guess the only case would be if sizeof(blob) was 0, then snprintf
would return a value < 1 according to the SUSv2.  Apparently C99 says
the return value will be > 0.  I guess this is a non-issue?

-- 
Peace and Blessings,
-Scott.

  reply	other threads:[~2012-10-03 13:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01 11:52 [PATCH 0/6] nfsdcltrack: create a new usermodehelper upcall program for tracking clients Jeff Layton
2012-10-01 11:52 ` [PATCH 1/6] nfsdcltrack: rename the nfsdcld directory and options to nfsdcltrack Jeff Layton
2012-10-01 11:52 ` [PATCH 2/6] nfsdcltrack: remove pointless sqlite_topdir variable Jeff Layton
2012-10-01 11:52 ` [PATCH 3/6] nfsdcltrack: break out a function to open the database handle Jeff Layton
2012-10-01 11:52 ` [PATCH 4/6] nfsdcltrack: add a new "one-shot" program for manipulating the client tracking db Jeff Layton
2012-10-01 11:52 ` [PATCH 5/6] nfsdcltrack: add a manpage for nfsdcltrack Jeff Layton
2012-10-01 11:52 ` [PATCH 6/6] nfsdcltrack: update the README about server startup order Jeff Layton
2012-10-03 12:42 ` [PATCH 7/6] nfsdcltrack: add a legacy transition mechanism Jeff Layton
2012-10-03 13:34   ` Scott Lovenberg
2012-10-03 13:40     ` Jeff Layton
2012-10-03 13:52       ` Scott Lovenberg [this message]
2012-10-03 13:54         ` Jeff Layton
2012-10-03 13:55           ` Scott Lovenberg

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=CAFB9KM3xDcvth1pOg-eDAPzM7Gu48A_ExY9vUk0Sb524aencGA@mail.gmail.com \
    --to=scott.lovenberg@gmail.com \
    --cc=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.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 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).