summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-12-30 18:24:39 -0800
committerJeremy Allison <jra@samba.org>2008-12-30 18:24:39 -0800
commit9eab2bfaf1a2f07451d0d40e9dc3323b0573a143 (patch)
treeea64f10190d3561a42c6c602660a1b372cef2966 /source3/web
parenta66c034c8e3da47bf492efb631a737581cc4b0d6 (diff)
downloadsamba-9eab2bfaf1a2f07451d0d40e9dc3323b0573a143.tar.gz
Fix more "ignore return value" warnings from gcc 4.3.
Jeremy
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/cgi.c4
-rw-r--r--source3/web/neg_lang.c3
-rw-r--r--source3/web/swat.c8
3 files changed, 9 insertions, 6 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 49e83717c3..40f9ee6966 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -498,7 +498,9 @@ static void cgi_download(char *file)
printf("Content-Length: %d\r\n\r\n", (int)st.st_size);
while ((l=read(fd,buf,sizeof(buf)))>0) {
- fwrite(buf, 1, l, stdout);
+ if (fwrite(buf, 1, l, stdout) != l) {
+ break;
+ }
}
close(fd);
exit(0);
diff --git a/source3/web/neg_lang.c b/source3/web/neg_lang.c
index 491ca9eedd..ae33dfc4ad 100644
--- a/source3/web/neg_lang.c
+++ b/source3/web/neg_lang.c
@@ -32,8 +32,7 @@ int web_open(const char *fname, int flags, mode_t mode)
char *lang = lang_tdb_current();
int fd;
if (lang) {
- asprintf(&p, "lang/%s/%s", lang, fname);
- if (p) {
+ if (asprintf(&p, "lang/%s/%s", lang, fname) != -1) {
fd = sys_open(p, flags, mode);
free(p);
if (fd != -1) {
diff --git a/source3/web/swat.c b/source3/web/swat.c
index b729e3b241..060f024581 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -156,7 +156,9 @@ static int include_html(const char *fname)
}
while ((ret = read(fd, buf, sizeof(buf))) > 0) {
- write(1, buf, ret);
+ if (write(1, buf, ret) == -1) {
+ break;
+ }
}
close(fd);
@@ -1253,8 +1255,8 @@ static void printers_page(void)
printf("<H2>%s</H2>\n", _("Printer Parameters"));
printf("<H3>%s</H3>\n", _("Important Note:"));
- printf(_("Printer names marked with [*] in the Choose Printer drop-down box "));
- printf(_("are autoloaded printers from "));
+ printf("%s",_("Printer names marked with [*] in the Choose Printer drop-down box "));
+ printf("%s",_("are autoloaded printers from "));
printf("<A HREF=\"/swat/help/smb.conf.5.html#printcapname\" target=\"docs\">%s</A>\n", _("Printcap Name"));
printf("%s\n", _("Attempting to delete these printers from SWAT will have no effect."));