]> git.ipfire.org Git - thirdparty/util-linux.git/commit
cfdisk: don't modify ncurses LINES and COLS
authorKarel Zak <kzak@redhat.com>
Wed, 1 Oct 2014 09:38:49 +0000 (11:38 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 1 Oct 2014 09:38:49 +0000 (11:38 +0200)
commiteef63970238a20d769e41e1261c4790b772d5b00
treee1b49aa16d3a2b5ae5fecbc2f8cd089175d5a5a8
parent1d966345df6721dc1da257867a18a84f1d9f98d5
cfdisk: don't modify ncurses LINES and COLS

On Sun, Sep 28, 2014 at 01:48:38AM -0700, pv4 wrote:
 If ncurses is build with --enable-reentrant, building
 util-linux-2.25.1 fails with the folllowing error:

     disk-utils/cfdisk.c: In function 'resize':
     disk-utils/cfdisk.c:202:9: error: lvalue required as left operand of assignment
        LINES = ws.ws_row;
              ^
     disk-utils/cfdisk.c:203:8: error: lvalue required as left operand of assignment
        COLS = ws.ws_col;
             ^

 man COLS gives the following:

     Depending on the configuration, these may be actual variables,
     or macros (see curs_threads(3X)) which provide read-only
     access to curses's state.  In either case, applications should
     treat them as read-only to avoid confusing the library.

Addresses: https://github.com/karelzak/util-linux/issues/125
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/cfdisk.c