Skip to content

Commit

Permalink
examples: Fix array arguements to API
Browse files Browse the repository at this point in the history
gcc throws an error without this formatting change.

Signed-off-by: Tyler Fanelli <[email protected]>
  • Loading branch information
tylerfanelli committed Oct 22, 2024
1 parent bae75d6 commit bfe0a21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/launch-tee.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

int main(int argc, char *const argv[])
{
char *const port_map[] =
const char *const port_map[] =
{
"18000:8000",
0
};
char *const rlimits[] =
const char *const rlimits[] =
{
// RLIMIT_NPROC = 6
"6=4096:8192",
Expand Down Expand Up @@ -88,14 +88,14 @@ int main(int argc, char *const argv[])
}

// Map port 18000 in the host to 8000 in the guest.
if (err = krun_set_port_map(ctx_id, &port_map[0])) {
if (err = krun_set_port_map(ctx_id, port_map)) {
errno = -err;
perror("Error configuring port map");
return -1;
}

// Configure the rlimits that will be set in the guest
if (err = krun_set_rlimits(ctx_id, &rlimits[0])) {
if (err = krun_set_rlimits(ctx_id, rlimits)) {
errno = -err;
perror("Error configuring rlimits");
return -1;
Expand Down

0 comments on commit bfe0a21

Please sign in to comment.