Skip to content

Commit dc10beb

Browse files
committed
Rename functions in utils_common.h
Rename: - os_getenv() to util_getenv() - os_free_getenv() to util_free_getenv() because the os_ prefix is used the OS memory provider. Signed-off-by: Lukasz Dorau <[email protected]>
1 parent 75f78c9 commit dc10beb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/utils/utils_common.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ extern "C" {
3131

3232
#define __TLS __declspec(thread)
3333

34-
static inline char *os_getenv(const char *name) {
34+
static inline char *util_getenv(const char *name) {
3535
char *buffer;
3636
size_t numberOfElements;
3737
errno_t err = _dupenv_s(&buffer, &numberOfElements, name);
@@ -42,14 +42,14 @@ static inline char *os_getenv(const char *name) {
4242
return buffer;
4343
}
4444

45-
static inline void os_free_getenv(char *val) { free(val); }
45+
static inline void util_free_getenv(char *val) { free(val); }
4646

4747
#else /* Linux */
4848

4949
#define __TLS __thread
5050

51-
static inline char *os_getenv(const char *name) { return getenv(name); }
52-
static inline void os_free_getenv(const char *val) {
51+
static inline char *util_getenv(const char *name) { return getenv(name); }
52+
static inline void util_free_getenv(const char *val) {
5353
(void)val; // unused
5454
}
5555

@@ -58,12 +58,12 @@ static inline void os_free_getenv(const char *val) {
5858
// check if we are running in the proxy library
5959
static inline int is_running_in_proxy_lib(void) {
6060
int is_in_proxy_lib_val = 0;
61-
char *ld_preload = os_getenv("LD_PRELOAD");
61+
char *ld_preload = util_getenv("LD_PRELOAD");
6262
if (ld_preload && strstr(ld_preload, "libumf_proxy.so")) {
6363
is_in_proxy_lib_val = 1;
6464
}
6565

66-
os_free_getenv(ld_preload);
66+
util_free_getenv(ld_preload);
6767
return is_in_proxy_lib_val;
6868
}
6969

0 commit comments

Comments
 (0)