X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=listati%2FUnSetTermAttr.c;h=bb9c21b6ea4f29f0ebc451c2e74b9d6cc7fd4f55;hp=fbeec7556c426e6f203f6bde19230c749ee7080d;hb=7e19b798d0cc09960daad695d8f3b242170bb3b4;hpb=06661f47754a536098afe2b30cb04469918f2fa3 diff --git a/listati/UnSetTermAttr.c b/listati/UnSetTermAttr.c index fbeec75..bb9c21b 100644 --- a/listati/UnSetTermAttr.c +++ b/listati/UnSetTermAttr.c @@ -2,14 +2,12 @@ int UnSetTermAttr(int fd, tcflag_t flag) { struct termios values; int res; - res = tcgetattr (desc, &values); - if (res) { + if (res = tcgetattr(desc, &values)) { perror("Cannot get attributes"); return res; } values.c_lflag &= (~flag); - res = tcsetattr (desc, TCSANOW, &values); - if (res) { + if (res = tcsetattr(desc, TCSANOW, &values)) { perror("Cannot set attributes"); return res; }