From 02683b20c0775dab28d72727cc97a96ec77cb20c Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Sat, 12 Jan 2019 23:06:39 +0000 Subject: regexec: prefix all regexec function calls with p_ Prefix all the calls to the the regexec family of functions with `p_`. This allows us to swap out all the regular expression functions with our own implementation. Move the declarations to `posix_regex.h` for simpler inclusion. --- src/errors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/errors.c') diff --git a/src/errors.c b/src/errors.c index afa340936..8ef491916 100644 --- a/src/errors.c +++ b/src/errors.c @@ -105,16 +105,16 @@ void git_error_set_str(int error_class, const char *string) set_error_from_buffer(error_class); } -int git_error_set_regex(const regex_t *regex, int error_code) +int git_error_set_regex(const p_regex_t *regex, int error_code) { char error_buf[1024]; assert(error_code); - regerror(error_code, regex, error_buf, sizeof(error_buf)); + p_regerror(error_code, regex, error_buf, sizeof(error_buf)); git_error_set_str(GIT_ERROR_REGEX, error_buf); - if (error_code == REG_NOMATCH) + if (error_code == P_REG_NOMATCH) return GIT_ENOTFOUND; return GIT_EINVALIDSPEC; -- cgit v1.2.1