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

Dan Nicholson dbn.lists at gmail.com
Mon Apr 26 15:44:56 PDT 2010


On Mon, Apr 26, 2010 at 3:37 PM, Jamey Sharp <jamey at minilop.net> 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: Dan Nicholson <dbn.lists at gmail.com>


More information about the xorg-devel mailing list