]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/request.c
Remove unnecessary nesting in if statements.
[thirdparty/cups.git] / cups / request.c
index 322ca660eae4e1b98a395dfd95335ed64ea2fdb7..7bee0a85b56ff8fd673f194bd580b55aded9dc1b 100644 (file)
@@ -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...