[1/2] tty: Save @flags unconditionaly for consistency

Submitted by Cyrill Gorcunov on May 21, 2016, 8:33 a.m.

Details

Message ID 1463819589-7963-2-git-send-email-gorcunov@openvz.org
State Accepted
Series "tty: Fix on queued data fetching"
Commit a57a5c18b6eeabc102f84538f967fa729d1af18f
Headers show

Commit Message

Cyrill Gorcunov May 21, 2016, 8:33 a.m.
For easier reading: we need it for pty queued data only,
but this way the code is simplier.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 criu/tty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/tty.c b/criu/tty.c
index 66b4e6f10cfb..1a3442d3e103 100644
--- a/criu/tty.c
+++ b/criu/tty.c
@@ -1660,6 +1660,7 @@  static int dump_tty_info(int lfd, u32 id, const struct fd_parms *p, struct tty_d
 	dinfo->pgrp		= pti->pgrp;
 	dinfo->fd		= p->fd;
 	dinfo->driver		= driver;
+	dinfo->flags		= p->flags;
 
 	if (is_pty(driver)) {
 		dinfo->lfd = dup(lfd);
@@ -1669,7 +1670,6 @@  static int dump_tty_info(int lfd, u32 id, const struct fd_parms *p, struct tty_d
 			return -1;
 		}
 		dinfo->index	= index;
-		dinfo->flags	= p->flags;
 	} else {
 		dinfo->index	= -1;
 		dinfo->lfd	= -1;