[PATCH] Boolean-or short-circuits, so (a || (!a && ...)) is redundant. Simplify.

Adam Jackson ajax at nwnk.net
Tue Apr 27 08:49:33 PDT 2010


On Mon, 2010-04-26 at 15:37 -0700, Jamey Sharp wrote:
> Signed-off-by: Jamey Sharp <jamey at minilop.net>
> ---
>  mi/miinitext.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/mi/miinitext.c b/mi/miinitext.c
> index 844863a..a7441c9 100644
> --- a/mi/miinitext.c
> +++ b/mi/miinitext.c
> @@ -537,8 +537,7 @@ InitExtensions(int argc, char *argv[])
>      for (i = 0; ExtensionModuleList[i].name != NULL; i++) {
>  	ext = &ExtensionModuleList[i];
>  	if (ext->initFunc != NULL && 
> -	    (ext->disablePtr == NULL || 
> -	     (ext->disablePtr != NULL && !*ext->disablePtr))) {
> +	    (ext->disablePtr == NULL || !*ext->disablePtr)) {
>  	    (ext->initFunc)();
>  	}
>      }

Reviewed-by: Adam Jackson <ajax at redhat.com>

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100427/d83e6762/attachment.pgp>


More information about the xorg-devel mailing list