Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Apr 2019 13:27:47 -0700
From:      Enji Cooper <yaneurabeya@gmail.com>
To:        rgrimes@freebsd.org
Cc:        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:  <FAF85814-991B-4D30-96AD-2B3D46E4E97F@gmail.com>
In-Reply-To: <201904052022.x35KMCo0041093@gndrsh.dnsmgr.net>
References:  <201904052022.x35KMCo0041093@gndrsh.dnsmgr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 5, 2019, at 13:22, Rodney W. Grimes <freebsd@gndrsh.dnsmgr.net> wrote=
:

>>> On Fri, Apr 5, 2019 at 6:49 AM Ed Maste <emaste@freebsd.org> wrote:
>>>=20
>>>> On Fri, 5 Apr 2019 at 00:49, Rodney W. Grimes <freebsd@gndrsh.dnsmgr.ne=
t> wrote:
>>>>=20
>>>=20
>>>>> +static const u_char dot_name[] =3D {
>>>>> +     '.', ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' };
>>>>> +static const u_char dotdot_name[] =3D {
>>>>> +     '.', '.',' ',' ',' ',' ',' ',' ',' ',' ',' ' };
>>>>> +
>>>=20
>>> They are all either '.' or ' ', the commas are just list separators.
>>> IMO spaces after the commas would make it slightly easier to see.
>>=20
>> Would it make sense to just use the normal string syntax for char
>> array assignment?
>>=20
>> static const u_char dot_name[11] =3D ".          ";
>> static const u_char dotdot_name[11] =3D "..         ";
>>=20
>> Seems more clear to me.
>=20
> To try and end this thread, I already stated it was in review,
> let me get a pointer to it, if you have comments please post
> them there:
> https://reviews.freebsd.org/D19829

It would probably be a good idea to add a comment in the code to document th=
e intention.
Thanks,
-Enji=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FAF85814-991B-4D30-96AD-2B3D46E4E97F>