X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=blobdiff_plain;f=listati%2FSetTermAttr.c;h=fbec08f444f45b5a338c3a0683e84c0d8804d699;hb=bee0c2b528d73f628f9f7e19e6b230ede97170e5;hp=41656f24769cea4dbb6a1ed7c957095ccc6b1938;hpb=06661f47754a536098afe2b30cb04469918f2fa3;p=gapil.git diff --git a/listati/SetTermAttr.c b/listati/SetTermAttr.c index 41656f2..fbec08f 100644 --- a/listati/SetTermAttr.c +++ b/listati/SetTermAttr.c @@ -1,19 +1,16 @@ #include #include #include - int SetTermAttr(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; }