diff options
author | Alfonso Gregory <83477269+AtariDreams@users.noreply.github.com> | 2021-08-30 12:23:00 -0400 |
---|---|---|
committer | Alfonso Gregory <83477269+AtariDreams@users.noreply.github.com> | 2021-09-07 11:55:17 -0400 |
commit | baa764fab09e72e667dc31c9397094627eda1913 (patch) | |
tree | d24e59172d1a41a568b15dc8716ebab18755df90 /cgi-bin | |
parent | fd5021277412ed47e9b4fa344396119c25f47ce6 (diff) | |
download | cups-baa764fab09e72e667dc31c9397094627eda1913.tar.gz |
Remove redundant code
Diffstat (limited to 'cgi-bin')
-rw-r--r-- | cgi-bin/template.c | 9 | ||||
-rw-r--r-- | cgi-bin/var.c | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/cgi-bin/template.c b/cgi-bin/template.c index 0b785b2f6..3300a8852 100644 --- a/cgi-bin/template.c +++ b/cgi-bin/template.c @@ -33,7 +33,6 @@ cgiCopyTemplateFile(FILE *out, /* I - Output file */ { FILE *in; /* Input file */ - fprintf(stderr, "DEBUG2: cgiCopyTemplateFile(out=%p, tmpl=\"%s\")\n", out, tmpl ? tmpl : "(null)"); @@ -51,7 +50,7 @@ cgiCopyTemplateFile(FILE *out, /* I - Output file */ if ((in = fopen(tmpl, "r")) == NULL) { fprintf(stderr, "ERROR: Unable to open template file \"%s\" - %s\n", - tmpl ? tmpl : "(null)", strerror(errno)); + tmpl, strerror(errno)); return; } @@ -91,8 +90,6 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */ * Convert the language to a locale name... */ - locale[0] = '\0'; - if ((lang = getenv("LANG")) != NULL) { locale[0] = '/'; @@ -101,6 +98,10 @@ cgiCopyTemplateLang(const char *tmpl) /* I - Base filename */ if ((locptr = strchr(locale, '.')) != NULL) *locptr = '\0'; /* Strip charset */ } + else + { + locale[0] = '\0'; + } fprintf(stderr, "DEBUG2: lang=\"%s\", locale=\"%s\"...\n", lang ? lang : "(null)", locale); diff --git a/cgi-bin/var.c b/cgi-bin/var.c index e8fc9cec8..c7289c721 100644 --- a/cgi-bin/var.c +++ b/cgi-bin/var.c @@ -304,7 +304,7 @@ cgiInitialize(void) if (boundary) boundary += 9; - if (content_type && !strncmp(content_type, "multipart/form-data; ", 21)) + if (!strncmp(content_type, "multipart/form-data; ", 21)) { if (!cgi_initialize_multipart(boundary)) return (0); |