From 51664dd7a9cf1aa1ad0d14149276d54f3356fb17 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 09:57:41 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- examples/cli/main.c | 2 +- lib/cnet/chnl/chnl_open.c | 2 +- lib/cnet/tcp/cnet_tcp_chnl.c | 2 +- lib/usr/app/cli/cli_auto_complete.c | 6 +++--- lib/usr/app/cli/cli_history.c | 2 +- lib/usr/clib/acl/cne_acl.h | 2 +- lib/usr/clib/cthread/cthread_tls.h | 2 +- test/testcne/loop_test.c | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/cli/main.c b/examples/cli/main.c index bc9e7d06..3f57ad6f 100644 --- a/examples/cli/main.c +++ b/examples/cli/main.c @@ -137,7 +137,7 @@ my_prompt(int cont __cne_unused) char *p = cli_path_string(NULL, NULL); if (!p) - p = (char *)(uintptr_t)"PathError"; + p = (char *)(uintptr_t) "PathError"; cne_printf("[orange]cli[]:[magenta]%s[yellow]>[] ", p); diff --git a/lib/cnet/chnl/chnl_open.c b/lib/cnet/chnl/chnl_open.c index 281ab40e..fe7507dd 100644 --- a/lib/cnet/chnl/chnl_open.c +++ b/lib/cnet/chnl/chnl_open.c @@ -156,7 +156,7 @@ chnl_open(const char *str, int flags, chnl_cb_t fn) domain = AF_UNSPEC; typ = 0; - ipaddr = (char *)(uintptr_t)"0.0.0.0"; + ipaddr = (char *)(uintptr_t) "0.0.0.0"; switch (pt->otype) { case UDP4_LISTEN: diff --git a/lib/cnet/tcp/cnet_tcp_chnl.c b/lib/cnet/tcp/cnet_tcp_chnl.c index e52156cd..44184e1f 100644 --- a/lib/cnet/tcp/cnet_tcp_chnl.c +++ b/lib/cnet/tcp/cnet_tcp_chnl.c @@ -465,7 +465,7 @@ tcp_chnl_opt_get(struct chnl *ch, int level, int optname, void *optval, uint32_t *resI = ch->ch_pcb->opt_flag & TCP_NOPUSH_FLAG; break; case TCP_CONGESTION: - resP = (void *)(uintptr_t)"reno"; + resP = (void *)(uintptr_t) "reno"; len = 5; break; case TCP_INFO: diff --git a/lib/usr/app/cli/cli_auto_complete.c b/lib/usr/app/cli/cli_auto_complete.c index 70257f85..c040a93e 100644 --- a/lib/usr/app/cli/cli_auto_complete.c +++ b/lib/usr/app/cli/cli_auto_complete.c @@ -175,9 +175,9 @@ complete_args(int argc, char **argv, uint32_t types) gb_str_insert(gb, &node->name[slen], nlen); if (is_directory(node)) - gb_str_insert(gb, (char *)(uintptr_t)"/", 1); + gb_str_insert(gb, (char *)(uintptr_t) "/", 1); else - gb_str_insert(gb, (char *)(uintptr_t)" ", 1); + gb_str_insert(gb, (char *)(uintptr_t) " ", 1); } } cli_node_list_free(nodes); @@ -238,7 +238,7 @@ cli_auto_complete(void) gb_copy_to_buf(this_cli->gb, save, size); /* Add the -? to the command */ - gb_str_insert(this_cli->gb, (char *)(uintptr_t)"-?", 2); + gb_str_insert(this_cli->gb, (char *)(uintptr_t) "-?", 2); cli_execute(); diff --git a/lib/usr/app/cli/cli_history.c b/lib/usr/app/cli/cli_history.c index d02e5572..c14db342 100644 --- a/lib/usr/app/cli/cli_history.c +++ b/lib/usr/app/cli/cli_history.c @@ -147,7 +147,7 @@ cli_history_next(void) return NULL; if (cli->curr_hist == CIRCLEQ_LAST(&cli->hd_hist)) - return (char *)(uintptr_t)""; + return (char *)(uintptr_t) ""; hist = CIRCLEQ_LOOP_NEXT(&cli->hd_hist, cli->curr_hist, next); cli->curr_hist = hist; diff --git a/lib/usr/clib/acl/cne_acl.h b/lib/usr/clib/acl/cne_acl.h index 799a11ca..f799023a 100644 --- a/lib/usr/clib/acl/cne_acl.h +++ b/lib/usr/clib/acl/cne_acl.h @@ -96,7 +96,7 @@ enum { }; #define CNE_ACL_MASKLEN_TO_BITMASK(v, s) \ - ((v) == 0 ? (v) : (typeof(v))((uint64_t)-1 << ((s) * CHAR_BIT - (v)))) + ((v) == 0 ? (v) : (typeof(v))((uint64_t) - 1 << ((s) * CHAR_BIT - (v)))) /** * Miscellaneous data for ACL rule. diff --git a/lib/usr/clib/cthread/cthread_tls.h b/lib/usr/clib/cthread/cthread_tls.h index 7105b7c5..8f39e865 100644 --- a/lib/usr/clib/cthread/cthread_tls.h +++ b/lib/usr/clib/cthread/cthread_tls.h @@ -12,7 +12,7 @@ extern "C" { #endif #ifndef __APPLE__ -#define CNE_PER_CTHREAD_SECTION_SIZE ((uintptr_t)&__stop_per_dt - (uintptr_t)&__start_per_dt) +#define CNE_PER_CTHREAD_SECTION_SIZE ((uintptr_t) & __stop_per_dt - (uintptr_t) & __start_per_dt) #else #define CNE_PER_CTHREAD_SECTION_SIZE 0 #endif diff --git a/test/testcne/loop_test.c b/test/testcne/loop_test.c index 49083b42..ec8b19fb 100644 --- a/test/testcne/loop_test.c +++ b/test/testcne/loop_test.c @@ -161,7 +161,7 @@ loop_main(int argc, char **argv) lport = 0; optind = 0; - ifname = (char *)(uintptr_t)"Unknown"; + ifname = (char *)(uintptr_t) "Unknown"; while ((opt = getopt_long(argc, argvopt, "Vi:d:DLT2", lgopts, &option_index)) != EOF) { switch (opt) { case 'V':