From b8526f8f0cb24c457da8c88877e516943e3e1902 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 24 Apr 2017 13:51:56 +0300 Subject: Make fdnull() to return auto_fd --- butl/curl.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'butl/curl.cxx') diff --git a/butl/curl.cxx b/butl/curl.cxx index 4951b52..12a1d54 100644 --- a/butl/curl.cxx +++ b/butl/curl.cxx @@ -25,7 +25,7 @@ namespace butl case ftp_get: case http_get: { - d.pipe.in.reset (fdnull ()); // /dev/null + d.pipe.in = fdnull (); // /dev/null return d.pipe.in.get (); } } @@ -60,7 +60,7 @@ namespace butl out.open (move (d.pipe.out)); } else - d.pipe.in.reset (fdnull ()); // /dev/null + d.pipe.in = fdnull (); // /dev/null return d.pipe.in.get (); } @@ -85,7 +85,7 @@ namespace butl case ftp_put: case http_post: // May or may not produce output. { - d.pipe.out.reset (fdnull ()); + d.pipe.out = fdnull (); return d.pipe.out.get (); // /dev/null } } @@ -113,7 +113,7 @@ namespace butl { d.options.push_back ("-o"); d.options.push_back (f.string ().c_str ()); - d.pipe.out.reset (fdnull ()); // /dev/null + d.pipe.out = fdnull (); // /dev/null } return d.pipe.out.get (); -- cgit v1.1