Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and maryamtahhan committed Dec 10, 2024
1 parent 1ecc77a commit 3b30955
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/cli/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion lib/cnet/chnl/chnl_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/cnet/tcp/cnet_tcp_chnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions lib/usr/app/cli/cli_auto_complete.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion lib/usr/app/cli/cli_history.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/usr/clib/acl/cne_acl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/usr/clib/cthread/cthread_tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/testcne/loop_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 3b30955

Please sign in to comment.