lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210323071945.GJ1667@kadam>
Date:   Tue, 23 Mar 2021 10:19:45 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Namjae Jeon <namjae.jeon@...sung.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-cifs@...r.kernel.org,
        linux-cifsd-devel@...ts.sourceforge.net, smfrench@...il.com,
        senozhatsky@...omium.org, hyc.lee@...il.com,
        viro@...iv.linux.org.uk, hch@....de, hch@...radead.org,
        ronniesahlberg@...il.com, aurelien.aptel@...il.com,
        aaptel@...e.com, sandeen@...deen.net, colin.king@...onical.com,
        rdunlap@...radead.org,
        "'Sergey Senozhatsky'" <sergey.senozhatsky@...il.com>,
        "'Steve French'" <stfrench@...rosoft.com>
Subject: Re: [PATCH 2/5] cifsd: add server-side procedures for SMB3

On Tue, Mar 23, 2021 at 08:17:47AM +0900, Namjae Jeon wrote:
> > > +
> > > +static int
> > > +compare_oid(unsigned long *oid1, unsigned int oid1len,
> > > +	    unsigned long *oid2, unsigned int oid2len) {
> > > +	unsigned int i;
> > > +
> > > +	if (oid1len != oid2len)
> > > +		return 0;
> > > +
> > > +	for (i = 0; i < oid1len; i++) {
> > > +		if (oid1[i] != oid2[i])
> > > +			return 0;
> > > +	}
> > > +	return 1;
> > > +}
> > 
> > Call this oid_eq()?
> Why not compare_oid()? This code is come from cifs.
> I need clear reason to change both cifs/cifsd...
> 

Boolean functions should tell you what they are testing in the name.
Without any context you can't know what if (compare_oid(one, two)) {
means, but if (oid_equal(one, two)) { is readable.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ