Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/lkl/fs2tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
case ARGP_KEY_END:
if (state->arg_num < 2 || !cla->fsimg_type)
argp_usage(state);
break;
default:
return ARGP_ERR_UNKNOWN;
}
Expand Down
4 changes: 2 additions & 2 deletions tools/lkl/lib/posix-host.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ static void mutex_free(struct lkl_mutex *_mutex)
static lkl_thread_t thread_create(void (*fn)(void *), void *arg)
{
pthread_t thread;
if (WARN_PTHREAD(pthread_create(&thread, NULL, (void* (*)(void *))fn, arg)))
if (WARN_PTHREAD(pthread_create(&thread, NULL, (void *)fn, arg)))
return 0;
else
return (lkl_thread_t) thread;
Expand Down Expand Up @@ -267,7 +267,7 @@ static void *timer_alloc(void (*fn)(void *), void *arg)
.sigev_value = {
.sival_ptr = arg,
},
.sigev_notify_function = (void (*)(union sigval))fn,
.sigev_notify_function = (void (*)())fn,
};

err = timer_create(CLOCK_REALTIME, &se, &timer);
Expand Down
2 changes: 1 addition & 1 deletion tools/lkl/lib/virtio_net_tap.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct lkl_netdev *lkl_netdev_tap_create(const char *ifname, int offload)
#endif
};

strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
snprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s", ifname);

return lkl_netdev_tap_init(path, offload, &ifr);
}