summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Landden <shawn@git.icu>2020-11-26 12:17:18 +0400
committerGitHub <noreply@github.com>2020-11-26 12:17:18 +0400
commitb862dc953ba5ab4c95ad2d4bca696c1be708f8bf (patch)
tree210dcfc0f8e9b6b6cce9b0a98d8754b523398324
parentf2766ff160549da1114f76982b0afb85bdb55e43 (diff)
parentc7547b9f133c335fdc7940e7d38d0638b26ca2fe (diff)
downloaddistcc-git-b862dc953ba5ab4c95ad2d4bca696c1be708f8bf.tar.gz
Merge pull request #403 from swegener/for-upstream
Two small fixes
-rw-r--r--src/argutil.c2
-rw-r--r--src/loadfile.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/argutil.c b/src/argutil.c
index cc71b82..feab385 100644
--- a/src/argutil.c
+++ b/src/argutil.c
@@ -150,7 +150,7 @@ char *dcc_argv_tostr(char **a)
/* kind of half-assed quoting; won't handle strings containing
* quotes properly, but good enough for debug messages for the
* moment. */
- int needs_quotes = (strpbrk(a[i], " \t\n\"\';") != NULL);
+ int needs_quotes = !*a[i] || (strpbrk(a[i], " \t\n\"\';") != NULL);
if (i)
*ss++ = ' ';
if (needs_quotes)
diff --git a/src/loadfile.c b/src/loadfile.c
index a692b72..b82e775 100644
--- a/src/loadfile.c
+++ b/src/loadfile.c
@@ -61,7 +61,7 @@ int dcc_load_file_string(const char *filename,
/* Open the file */
if ((fd = open(filename, O_RDONLY)) == -1) {
- if (errno == EEXIST)
+ if (errno == ENOENT)
return EXIT_NO_SUCH_FILE;
else {
rs_log_warning("failed to open %s: %s", filename,