Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stdbool.h for booleans #660

Merged
merged 1 commit into from
Oct 8, 2024
Merged
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
20 changes: 10 additions & 10 deletions bind-mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ match_token (const char *token, const char *token_end, const char *str)
if (token == token_end)
return *str == 0;

return FALSE;
return false;
}

static unsigned long
Expand Down Expand Up @@ -281,12 +281,12 @@ parse_mountinfo (int proc_fd,
die ("Can't parse mountinfo line");
rest = line + consumed;

rest = skip_token (rest, TRUE); /* mountroot */
rest = skip_token (rest, true); /* mountroot */
mountpoint = rest;
rest = skip_token (rest, FALSE); /* mountpoint */
rest = skip_token (rest, false); /* mountpoint */
mountpoint_end = rest++;
options = rest;
rest = skip_token (rest, FALSE); /* vfs options */
rest = skip_token (rest, false); /* vfs options */
options_end = rest;

*mountpoint_end = 0;
Expand Down Expand Up @@ -324,7 +324,7 @@ parse_mountinfo (int proc_fd,
MountInfoLine *parent = by_id[this->parent_id];
MountInfoLine **to_sibling;
MountInfoLine *sibling;
bool covered = FALSE;
bool covered = false;

if (!has_path_prefix (this->mountpoint, root_mount))
continue;
Expand All @@ -333,7 +333,7 @@ parse_mountinfo (int proc_fd,
continue;

if (strcmp (parent->mountpoint, this->mountpoint) == 0)
parent->covered = TRUE;
parent->covered = true;

to_sibling = &parent->first_child;
sibling = parent->first_child;
Expand All @@ -344,7 +344,7 @@ parse_mountinfo (int proc_fd,
* covered by the sibling, and we drop it. */
if (has_path_prefix (this->mountpoint, sibling->mountpoint))
{
covered = TRUE;
covered = true;
break;
}

Expand Down Expand Up @@ -499,7 +499,7 @@ bind_mount_result_to_string (bind_mount_result res,
bool *want_errno_p)
{
char *string = NULL;
bool want_errno = TRUE;
bool want_errno = true;

switch (res)
{
Expand All @@ -521,7 +521,7 @@ bind_mount_result_to_string (bind_mount_result res,

case BIND_MOUNT_ERROR_FIND_DEST_MOUNT:
string = xasprintf ("Unable to find \"%s\" in mount table", failing_path);
want_errno = FALSE;
want_errno = false;
break;

case BIND_MOUNT_ERROR_REMOUNT_DEST:
Expand Down Expand Up @@ -557,7 +557,7 @@ die_with_bind_result (bind_mount_result res,
...)
{
va_list args;
bool want_errno = TRUE;
bool want_errno = true;
char *message;

if (bwrap_level_prefix)
Expand Down
Loading
Loading