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: <20080207124745.4868e108.akpm@linux-foundation.org>
Date:	Thu, 7 Feb 2008 12:47:45 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Mark Fasheh <mark.fasheh@...cle.com>
Cc:	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	ocfs2-devel@....oracle.com
Subject: Re: [git patches] ocfs2 update

On Thu, 7 Feb 2008 12:09:44 -0800
Mark Fasheh <mark.fasheh@...cle.com> wrote:

>  /*
> - * dlm_register_domain: one-time setup per "domain"
> + * Compare a requested locking protocol version against the current one.
> + *
> + * If the major numbers are different, they are incompatible.
> + * If the current minor is greater than the request, they are incompatible.
> + * If the current minor is less than or equal to the request, they are
> + * compatible, and the requester should run at the current minor version.
> + */
> +static int dlm_protocol_compare(struct dlm_protocol_version *existing,
> +				struct dlm_protocol_version *request)
> +{
> +	if (existing->pv_major != request->pv_major)
> +		return 1;
> +
> +	if (existing->pv_minor > request->pv_minor)
> +		return 1;
> +
> +	if (existing->pv_minor < request->pv_minor)
> +		request->pv_minor = existing->pv_minor;
> +
> +	return 0;
> +}
> +

It's somewhat obnoxious that what appears to be a straightforward
compare-two-things-and-return-result function will actually modify one of
the things which it is allegedly comparing.

Please integrate checkpatch into your processes - this one had a few little
glitches.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ