Skip to content

Commit b0066da

Browse files
committed
fix a compile warning for different enumeration types
1 parent 4be7a83 commit b0066da

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/network.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -418,28 +418,28 @@ bool network_compute_endpoints (sqlite3_context *context, network_data *data, co
418418

419419
// set URL: https://UUID.g5.sqlite.cloud:443/chinook.sqlite?apikey=hWDanFolRT9WDK0p54lufNrIyfgLZgtMw6tb6fbPmpo
420420
rc = curl_url_set(url, CURLUPART_URL, conn_string_https, 0);
421-
if (rc != CURLE_OK) goto finalize;
421+
if (rc != CURLUE_OK) goto finalize;
422422

423423
// https (MANDATORY)
424424
rc = curl_url_get(url, CURLUPART_SCHEME, &scheme, 0);
425-
if (rc != CURLE_OK) goto finalize;
425+
if (rc != CURLUE_OK) goto finalize;
426426

427427
// UUID.g5.sqlite.cloud (MANDATORY)
428428
rc = curl_url_get(url, CURLUPART_HOST, &host, 0);
429-
if (rc != CURLE_OK) goto finalize;
429+
if (rc != CURLUE_OK) goto finalize;
430430

431431
// 443 (OPTIONAL)
432432
rc = curl_url_get(url, CURLUPART_PORT, &port, 0);
433-
if (rc != CURLE_OK && rc != CURLUE_NO_PORT) goto finalize;
433+
if (rc != CURLUE_OK && rc != CURLUE_NO_PORT) goto finalize;
434434
char *port_or_default = port && strcmp(port, "8860") != 0 ? port : CLOUDSYNC_DEFAULT_ENDPOINT_PORT;
435435

436436
// /chinook.sqlite (MANDATORY)
437437
rc = curl_url_get(url, CURLUPART_PATH, &database, 0);
438-
if (rc != CURLE_OK) goto finalize;
438+
if (rc != CURLUE_OK) goto finalize;
439439

440440
// apikey=hWDanFolRT9WDK0p54lufNrIyfgLZgtMw6tb6fbPmpo (OPTIONAL)
441441
rc = curl_url_get(url, CURLUPART_QUERY, &query, 0);
442-
if (rc != CURLE_OK && rc != CURLUE_NO_QUERY) goto finalize;
442+
if (rc != CURLUE_OK && rc != CURLUE_NO_QUERY) goto finalize;
443443
if (query != NULL) {
444444
char value[MAX_QUERY_VALUE_LEN];
445445
if (!authentication && network_extract_query_param(query, "apikey", value, sizeof(value)) == 0) {
@@ -463,8 +463,8 @@ bool network_compute_endpoints (sqlite3_context *context, network_data *data, co
463463
finalize:
464464
if (result == false) {
465465
// store proper result code/message
466-
if (rc != CURLE_OK) sqlite3_result_error(context, curl_url_strerror(rc), -1);
467-
sqlite3_result_error_code(context, (rc != CURLE_OK) ? SQLITE_ERROR : SQLITE_NOMEM);
466+
if (rc != CURLUE_OK) sqlite3_result_error(context, curl_url_strerror(rc), -1);
467+
sqlite3_result_error_code(context, (rc != CURLUE_OK) ? SQLITE_ERROR : SQLITE_NOMEM);
468468

469469
// cleanup memory managed by the extension
470470
if (authentication) cloudsync_memory_free(authentication);

0 commit comments

Comments
 (0)