tree-wide: remove last -1 fd initialization with cleanup macros in favor of -EBADF

parent f62cf1d4
......@@ -131,7 +131,7 @@ static void lxc_proc_put_context_info(struct lxc_proc_context_info *ctx)
*/
static int in_same_namespace(pid_t pid1, pid_t pid2, const char *ns)
{
__do_close int ns_fd1 = -1, ns_fd2 = -1;
__do_close int ns_fd1 = -EBADF, ns_fd2 = -EBADF;
int ret = -1;
struct stat ns_st1, ns_st2;
......
......@@ -39,7 +39,7 @@ static lxc_id128_t make_v4_uuid(lxc_id128_t id)
static int get_random_bytes(void *p, size_t n)
{
__do_close int fd = -1;
__do_close int fd = -EBADF;
ssize_t bytes = 0;
fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC | O_NOCTTY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment