X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fpty.c;h=0f80f4863b0e1f4bde990f777bd1290331ebe91c;hb=30ab6a0fc1bb950c4dcd90dcd3dfe00a810c7fc1;hp=6863be654eaa676a4f82cc12af45b6f2ebb2cecd;hpb=611b312b7d0799281347374dc303c73a066cedf8;p=elogind.git diff --git a/src/shared/pty.c b/src/shared/pty.c index 6863be654..0f80f4863 100644 --- a/src/shared/pty.c +++ b/src/shared/pty.c @@ -44,18 +44,12 @@ #include #include -#include -#include #include #include #include -#include #include -#include #include -#include #include -#include #include #include #include @@ -550,16 +544,15 @@ int pty_signal(Pty *pty, int sig) { } int pty_resize(Pty *pty, unsigned short term_width, unsigned short term_height) { - struct winsize ws; + struct winsize ws = { + .ws_col = term_width, + .ws_row = term_height, + }; assert_return(pty, -EINVAL); assert_return(pty_is_open(pty), -ENODEV); assert_return(pty_is_parent(pty), -ENODEV); - zero(ws); - ws.ws_col = term_width; - ws.ws_row = term_height; - /* * This will send SIGWINCH to the pty slave foreground process group. * We will also get one, but we don't need it.