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

ifapi_profiles.c uses the deprecated index() function #2656

Closed
Akuli opened this issue Jul 11, 2023 · 0 comments · Fixed by #2657
Closed

ifapi_profiles.c uses the deprecated index() function #2656

Akuli opened this issue Jul 11, 2023 · 0 comments · Fixed by #2657

Comments

@Akuli
Copy link

Akuli commented Jul 11, 2023

/* Search for path delimiter */
split = index(name, IFAPI_FILE_DELIM_CHAR);
/* If the path beging with delimiters, skip over those */
if (name == split) {
name += 1;
split = index(name, IFAPI_FILE_DELIM_CHAR);
}

This causes problems for me when compiling on a libc that doesn't have index(). A simple #define index(...) strchr(__VA_ARGS__) solved it for me, but it would be nice to not use a deprecated function in the first place when there is a not-deprecated function that does the same thing.

JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this issue Jul 11, 2023
The deprecated index function is replaces by strchr.
Fixes: tpm2-software#2656

Signed-off-by: Juergen Repp <juergen_repp@web.de>
JuergenReppSIT added a commit to JuergenReppSIT/tpm2-tss that referenced this issue Jul 11, 2023
The deprecated index function is replaced by strchr.
Fixes: tpm2-software#2656

Signed-off-by: Juergen Repp <juergen_repp@web.de>
JuergenReppSIT added a commit that referenced this issue Jul 12, 2023
The deprecated index function is replaced by strchr.
Fixes: #2656

Signed-off-by: Juergen Repp <juergen_repp@web.de>
AndreasFuchsTPM pushed a commit that referenced this issue Jan 30, 2024
The deprecated index function is replaced by strchr.
Fixes: #2656

Signed-off-by: Juergen Repp <juergen_repp@web.de>
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 a pull request may close this issue.

1 participant