Module: kamailio
Branch: master
Commit: f0ac15dc896f959cb92ad85fd1426fac1aa0bb55
URL:
https://github.com/kamailio/kamailio/commit/f0ac15dc896f959cb92ad85fd1426fa…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2016-06-06T12:05:39+02:00
tls: fix compilation warning
tls_config.c:403:6: warning: ignoring return value of
function declared with warn_unused_result attribute [-Wunused-result]
write(out_fd, &ch, 1);
^~~~~ ~~~~~~~~~~~~~~
tls_config.c:408:5: warning: ignoring return value of function declared with
warn_unused_result attribute [-Wunused-result]
write(out_fd, &ch, 1);
^~~~~ ~~~~~~~~~~~~~~
2 warnings generated.
---
Modified: modules/tls/tls_config.c
---
Diff:
https://github.com/kamailio/kamailio/commit/f0ac15dc896f959cb92ad85fd1426fa…
Patch:
https://github.com/kamailio/kamailio/commit/f0ac15dc896f959cb92ad85fd1426fa…
---
diff --git a/modules/tls/tls_config.c b/modules/tls/tls_config.c
index af1d88a..fc63155 100644
--- a/modules/tls/tls_config.c
+++ b/modules/tls/tls_config.c
@@ -400,12 +400,16 @@ tls_domains_cfg_t* tls_load_config(str* filename)
pkg_free(file_path);
file_path = NULL;
while (read(in_fd, &ch, 1)) {
- write(out_fd, &ch, 1);
+ if (write(out_fd, &ch, 1)<0) {
+ LOG(L_ERR, "write error: %s\n", strerror(errno));
+ }
}
close(in_fd);
in_fd = 0;
ch = '\n';
- write(out_fd, &ch, 1);
+ if (write(out_fd, &ch, 1)<0) {
+ LOG(L_ERR, "write error: %s\n", strerror(errno));
+ }
}
}
closedir(dir);