Skip to content
Snippets Groups Projects
  • Zi Shen Lim's avatar
    cae7be1a
    mnexec: getopt bugfix · cae7be1a
    Zi Shen Lim authored
    getopt returns an 'int', so use change datatype of 'c' to match it.
    Otherwise, 'c' may hold a value of 255 (0xff), and fail the comparison
    with -1 (0xffffffff): while ((c = getopt(...)) != -1)
    
    This bug was uncovered on Ubuntu 13.04 running on ARM, using
    arm-linux-gnueabihf-gcc4.7.
    cae7be1a
    History
    mnexec: getopt bugfix
    Zi Shen Lim authored
    getopt returns an 'int', so use change datatype of 'c' to match it.
    Otherwise, 'c' may hold a value of 255 (0xff), and fail the comparison
    with -1 (0xffffffff): while ((c = getopt(...)) != -1)
    
    This bug was uncovered on Ubuntu 13.04 running on ARM, using
    arm-linux-gnueabihf-gcc4.7.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.