From: DavieV Date: Mon, 16 Oct 2017 21:24:13 +0000 (-0700) Subject: Remove unnecessary nesting in if statements. X-Git-Tag: v2.2.6~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c00282bb43f7d5731faef419b6dea21aa4f24fbe;p=thirdparty%2Fcups.git Remove unnecessary nesting in if statements. --- diff --git a/cups/request.c b/cups/request.c index 322ca660ea..7bee0a85b5 100644 --- a/cups/request.c +++ b/cups/request.c @@ -131,13 +131,12 @@ cupsDoIORequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP * Get the default connection as needed... */ - if (!http) - if ((http = _cupsConnect()) == NULL) - { - ippDelete(request); + if (!http && (http = _cupsConnect()) == NULL) + { + ippDelete(request); - return (NULL); - } + return (NULL); + } /* * See if we have a file to send... @@ -578,9 +577,8 @@ cupsSendRequest(http_t *http, /* I - Connection to server or @code CUPS_HTTP * Get the default connection as needed... */ - if (!http) - if ((http = _cupsConnect()) == NULL) - return (HTTP_STATUS_SERVICE_UNAVAILABLE); + if (!http && (http = _cupsConnect()) == NULL) + return (HTTP_STATUS_SERVICE_UNAVAILABLE); /* * If the prior request was not flushed out, do so now...