• Egbert Eich's avatar
    kdrive/UnregisterFd: Fix off by one · 44d0fd43
    Egbert Eich authored
    The number of FDs has been decremented already, therefore the
    number contained the index of the top one that is to me moved down.
    
    This problem was introduced by:
      commit 1110b71e
      Author: Chris Clayton <chris2553@googlemail.com>
    
        kdrive: fix build error on gcc 4.8 for out-of-bounds array access
    
    The reason for the warning was likely a confused compiler.
    Hoping to reduce the confusion by moving the decrement behind the end
    if the copy loop.
    Signed-off-by: 's avatarEgbert Eich <eich@suse.de>
    Reviewed-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net>
    44d0fd43
kinput.c 57 KB