diff options
author | AlexSm <alex@ydb.tech> | 2023-12-22 17:10:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-22 17:10:22 +0100 |
commit | 148f920350c60c0ca2d89b637a5aea9093eee450 (patch) | |
tree | 6314b1433dac833398c333731e83f0ad77e81a0b /contrib/libs/curl/src/tool_findfile.c | |
parent | 7116d46ae7c0259b5f9d489de263f8701e432b1c (diff) | |
download | ydb-148f920350c60c0ca2d89b637a5aea9093eee450.tar.gz |
Library import 2 (#639)
Diffstat (limited to 'contrib/libs/curl/src/tool_findfile.c')
-rw-r--r-- | contrib/libs/curl/src/tool_findfile.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/libs/curl/src/tool_findfile.c b/contrib/libs/curl/src/tool_findfile.c index 201d8f0a81..51a45ff3a0 100644 --- a/contrib/libs/curl/src/tool_findfile.c +++ b/contrib/libs/curl/src/tool_findfile.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -49,7 +49,7 @@ struct finder { /* The order of the variables below is important, as the index number is used in the findfile() function */ -static const struct finder conf_list[] = { +static const struct finder list[] = { { "CURL_HOME", NULL, FALSE }, { "XDG_CONFIG_HOME", NULL, FALSE }, /* index == 1, used in the code */ { "HOME", NULL, FALSE }, @@ -109,8 +109,8 @@ char *findfile(const char *fname, int dotscore) if(!fname[0]) return NULL; - for(i = 0; conf_list[i].env; i++) { - char *home = curl_getenv(conf_list[i].env); + for(i = 0; list[i].env; i++) { + char *home = curl_getenv(list[i].env); if(home) { char *path; const char *filename = fname; @@ -120,14 +120,14 @@ char *findfile(const char *fname, int dotscore) curl_free(home); continue; } - if(conf_list[i].append) { - char *c = curl_maprintf("%s%s", home, conf_list[i].append); + if(list[i].append) { + char *c = curl_maprintf("%s%s", home, list[i].append); curl_free(home); if(!c) return NULL; home = c; } - if(conf_list[i].withoutdot) { + if(list[i].withoutdot) { if(!dotscore || xdg) { /* this is not looking for .curlrc, or the XDG_CONFIG_HOME was defined so we skip the extended check */ |