Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2019 13:06:07 -0700
From:      Xin LI <delphij@gmail.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        Conrad Meyer <cem@freebsd.org>, Ed Maste <emaste@freebsd.org>, Xin LI <delphij@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r345900 - head/sbin/fsck_msdosfs
Message-ID:  <CAGMYy3vPzoaM_BhfnOU=uWOo%2B6SpcTPKb_rC%2BM0GC70FJB%2B%2BeQ@mail.gmail.com>
In-Reply-To: <f2362831-8dc5-bf50-a79b-27c871db32e9@selasky.org>
References:  <201904050221.x352LGjU015040@repo.freebsd.org> <201904050449.x354nUEC036896@gndrsh.dnsmgr.net> <CAPyFy2C3KXTB7EKnp1PJigjUXY3xB_%2BPUddi43hjp5oKpZP56w@mail.gmail.com> <CAG6CVpXyLGNmhH-QMjOsLmrvsD5LO1cnk%2BhVqrG5pYa5F=U2Rg@mail.gmail.com> <f2362831-8dc5-bf50-a79b-27c871db32e9@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 5, 2019 at 12:56 PM Hans Petter Selasky <hps@selasky.org> wrote:

> On 4/5/19 9:51 PM, Conrad Meyer wrote:
> > static const u_char dot_name[11] = ".          ";
> > static const u_char dotdot_name[11] = "..         ";
> >
> > Seems more clear to me.
>
> Using this syntax will include a terminating zero.
>

No, that only applies when the length is omitted (char foo[] = "string"
would have \0, but foo[sizeof("string") -1] = "string" won't).

Cheers,



>
> --HPS
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGMYy3vPzoaM_BhfnOU=uWOo%2B6SpcTPKb_rC%2BM0GC70FJB%2B%2BeQ>