]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib530, 582: smoothen out minor differences
authorViktor Szakats <commit@vsz.me>
Tue, 17 Jun 2025 08:50:43 +0000 (10:50 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 19 Jun 2025 18:53:30 +0000 (20:53 +0200)
Fix indentation, casts, a few other minor difference between these tests
that share a common codebase.

Closes #17649

tests/libtest/lib530.c
tests/libtest/lib582.c

index db81b6dfb550ddce4fff2a9124644d0dc2d768ec..c558799b2258ce5446cb9724eb57f9a9f0444d4c 100644 (file)
@@ -60,7 +60,7 @@ static void t530_removeFd(struct t530_Sockets *sockets, curl_socket_t fd,
     if(sockets->sockets[i] == fd) {
       if(i < sockets->count - 1)
         memmove(&sockets->sockets[i], &sockets->sockets[i + 1],
-              sizeof(curl_socket_t) * (sockets->count - (i + 1)));
+                sizeof(curl_socket_t) * (sockets->count - (i + 1)));
       --sockets->count;
     }
   }
@@ -189,7 +189,7 @@ static int t530_checkForCompletion(CURLM *curl, int *success)
     }
     else {
       curl_mfprintf(stderr, "Got an unexpected message from curl: %i\n",
-                    message->msg);
+                    (int)message->msg);
       result = 1;
       *success = 0;
     }
@@ -372,6 +372,7 @@ test_cleanup:
   /* free local memory */
   free(sockets.read.sockets);
   free(sockets.write.sockets);
+
   return res;
 }
 
index fa8471da076f778a7c04f3b35490083cf6464f98..47a93f003f8eadd98962b03fd895caf7c4b25da7 100644 (file)
@@ -53,7 +53,7 @@ static void t582_removeFd(struct t582_Sockets *sockets, curl_socket_t fd,
     if(sockets->sockets[i] == fd) {
       if(i < sockets->count - 1)
         memmove(&sockets->sockets[i], &sockets->sockets[i + 1],
-              sizeof(curl_socket_t) * (sockets->count - (i + 1)));
+                sizeof(curl_socket_t) * (sockets->count - (i + 1)));
       --sockets->count;
     }
   }
@@ -271,7 +271,7 @@ static CURLcode test_lib582(char *URL)
   curl_mfprintf(stderr, "Set to upload %d bytes\n", (int)file_info.st_size);
 
   res_global_init(CURL_GLOBAL_ALL);
-  if(res) {
+  if(res != CURLE_OK) {
     fclose(hd_src);
     return res;
   }