summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno Dilly <bdilly@profusion.mobi>2016-09-20 16:13:25 -0700
committerCedric BAIL <cedric@osg.samsung.com>2016-09-20 16:13:28 -0700
commita3fba57b2616f78fbdab7b43ac8e8aea7c56475b (patch)
treee2c2b54203919117e606bf355ec974f367f41248 /src
parent03882d558824f657f5c5a54fcd2d632eafeafd87 (diff)
ecore_con,elput: fix warnings
Summary: elput: fix warning for unused write result ecore_con: fix warning for unused asprintf result Reviewers: iscaro, devilhorns, cedric Reviewed By: cedric Subscribers: cedric, seoz, jpeg Differential Revision: https://phab.enlightenment.org/D4308 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_con/ecore_con.c15
-rw-r--r--src/lib/elput/elput_logind.c14
2 files changed, 24 insertions, 5 deletions
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index cc17fe8348..cb66b27d2f 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -4487,11 +4487,18 @@ _efl_net_ip_connect_async_run(void *data, Ecore_Thread *thread EINA_UNUSED)
4487 * parameter must be a URL with schema, otherwise it won't 4487 * parameter must be a URL with schema, otherwise it won't
4488 * return anything. 4488 * return anything.
4489 */ 4489 */
4490 char *url; 4490 Eina_Stringshare *url;
4491 4491
4492 asprintf(&url, "%s://%s:%s", d->protocol == IPPROTO_UDP ? "udp" : "tcp", host, port); 4492 url = eina_stringshare_printf("%s://%s:%s", d->protocol == IPPROTO_UDP ? "udp" : "tcp", host, port);
4493 proxies = ecore_con_libproxy_proxies_get(url); 4493 if (!url)
4494 free(url); 4494 {
4495 ERR("Could not assemble URL");
4496 }
4497 else
4498 {
4499 proxies = ecore_con_libproxy_proxies_get(url);
4500 eina_stringshare_del(url);
4501 }
4495 } 4502 }
4496 4503
4497 EINA_THREAD_CLEANUP_PUSH((Eina_Free_Cb)ecore_con_libproxy_proxies_free, proxies); 4504 EINA_THREAD_CLEANUP_PUSH((Eina_Free_Cb)ecore_con_libproxy_proxies_free, proxies);
diff --git a/src/lib/elput/elput_logind.c b/src/lib/elput/elput_logind.c
index 5d97a020cd..abe4a381d6 100644
--- a/src/lib/elput/elput_logind.c
+++ b/src/lib/elput/elput_logind.c
@@ -276,7 +276,19 @@ _logind_device_release(Elput_Manager *em, uint32_t major, uint32_t minor)
276static void 276static void
277_logind_pipe_write_fd(Elput_Manager *em, int fd) 277_logind_pipe_write_fd(Elput_Manager *em, int fd)
278{ 278{
279 write(em->input.pipe, &fd, sizeof(int)); 279 int ret;
280
281 while (1)
282 {
283 ret = write(em->input.pipe, &fd, sizeof(int));
284 if (ret < 0)
285 {
286 if ((errno == EAGAIN) || (errno == EINTR))
287 continue;
288 WRN("Failed to write to input pipe");
289 }
290 break;
291 }
280 close(em->input.pipe); 292 close(em->input.pipe);
281 em->input.pipe = -1; 293 em->input.pipe = -1;
282} 294}