]> granicus.if.org Git - curl/commitdiff
cleanup: remove DOT_CHAR completely
authorDaniel Stenberg <daniel@haxx.se>
Tue, 20 Aug 2019 11:22:15 +0000 (13:22 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 20 Aug 2019 21:07:59 +0000 (23:07 +0200)
Follow-up to f9c7ba9096ec

The use of DOT_CHAR for ".ssh" was probably a mistake and is removed
now.

Pointed-out-by: Gisle Vanem
Bug: https://github.com/curl/curl/pull/4230#issuecomment-522960638

Closes #4247

lib/curl_setup.h
lib/url.c
src/tool_operate.c

index 2b3f9f2fda26bee06908728d44e462bb1240ed6b..13af8cdec9de73a3de41acc27b00954d9915d030 100644 (file)
 #ifdef WIN32
 
 #  define DIR_CHAR      "\\"
-#  define DOT_CHAR      "_"
 
 #else /* WIN32 */
 
 #  endif
 
 #  define DIR_CHAR      "/"
-#  ifndef DOT_CHAR
-#    define DOT_CHAR      "."
-#  endif
-
-#  ifdef MSDOS
-#    undef DOT_CHAR
-#    define DOT_CHAR      "_"
-#  endif
 
 #  ifndef fileno /* sunos 4 have this as a macro! */
      int fileno(FILE *stream);
index 30263258f8e07b67626c974384a5f5c281832c40..437b5d85ca5b9eab875e12cc32492dd7f7ff8f58 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2860,8 +2860,7 @@ static CURLcode override_login(struct Curl_easy *data,
                           &netrc_user_changed, &netrc_passwd_changed,
                           data->set.str[STRING_NETRC_FILE]);
     if(ret > 0) {
-      infof(data, "Couldn't find host %s in the "
-            DOT_CHAR "netrc file; using defaults\n",
+      infof(data, "Couldn't find host %s in the .netrc file; using defaults\n",
             conn->host.name);
     }
     else if(ret < 0) {
index c9189bdeee015f95c60b2c9ddaf0fe1385322feb..87d3ab89cc5d502e3bbcdce09f9e7b2fe139ae97 100644 (file)
@@ -1487,7 +1487,7 @@ static CURLcode create_transfers(struct GlobalConfig *global,
             result = CURLE_OUT_OF_MEMORY;
             home = homedir();
             if(home) {
-              file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR);
+              file = aprintf("%s/.ssh/known_hosts", home);
               if(file) {
                 /* new in curl 7.19.6 */
                 result = res_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);