mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 08:49:01 +00:00
CID:1216560 Unchecked return value from ioctl
This commit is contained in:
parent
ead290870a
commit
e992c4c4d8
@ -139,10 +139,10 @@ static void screen_size(int *x, int *y)
|
|||||||
|
|
||||||
#elif defined(TIOCGWINSZ)
|
#elif defined(TIOCGWINSZ)
|
||||||
struct winsize w;
|
struct winsize w;
|
||||||
ioctl(0, TIOCGWINSZ, &w);
|
if ( (ioctl(0, TIOCGWINSZ, &w)) >= 0 ) {
|
||||||
|
|
||||||
if (x) *x = w.ws_col;
|
if (x) *x = w.ws_col;
|
||||||
if (y) *y = w.ws_row;
|
if (y) *y = w.ws_row;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if (x) *x = 80;
|
if (x) *x = 80;
|
||||||
if (y) *y = 24;
|
if (y) *y = 24;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user