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

Restrict-qualify iolog_path_escapes like we do with check_iolog_path #390

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented Aug 12, 2024

This matches the same functions in check_iolog_path.

@millert
Copy link
Collaborator

millert commented Aug 12, 2024

Do you think it is worth adding restrict to copy_fn here?

struct iolog_path_escape {
    const char *name;
    size_t (*copy_fn)(char * restrict, size_t, void * restrict);
};

I don't believe it has any real effect but would act as a hint to use restrict in the various copy functions.

@AZero13
Copy link
Contributor Author

AZero13 commented Aug 12, 2024

Do you think it is worth adding restrict to copy_fn here?

struct iolog_path_escape {
    const char *name;
    size_t (*copy_fn)(char * restrict, size_t, void * restrict);
};

I don't believe it has any real effect but would act as a hint to use restrict in the various copy functions.

I do actually!

Also add it to the function pointer definition to act as a hint to use restrict in the various copy functions.
@millert millert merged commit 85d08e9 into sudo-project:main Aug 12, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants