Date: Mon, 20 May 2019 13:46:48 -0700 From: Enji Cooper <yaneurabeya@gmail.com> To: Konstantin Belousov <kostikbel@gmail.com> Cc: Alan Somers <asomers@FreeBSD.org>, src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: Re: svn commit: r348007 - projects/fuse2/lib/libc/gen Message-ID: <2ED92F08-9353-4476-80B0-F1F8581FC5F1@gmail.com> In-Reply-To: <20190520202210.GT2748@kib.kiev.ua> References: <201905201936.x4KJaaIC023310@repo.freebsd.org> <20190520202210.GT2748@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
> On May 20, 2019, at 1:22 PM, Konstantin Belousov <kostikbel@gmail.com> = wrote: >=20 > On Mon, May 20, 2019 at 07:36:36PM +0000, Alan Somers wrote: >> + >> + return (strncmp(fsname, fusefs_dot, strlen(fusefs_dot)) =3D=3D 0 = && > strlen() is not needed, you can use sizeof() - 1. This only works with single-byte char arrays. strlen is better = (at least easier to spot and replace) when working with multibyte = strings. Thank you, -Enji=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2ED92F08-9353-4476-80B0-F1F8581FC5F1>