Changeset 84a1a54 in mainline for uspace/app/sysinfo/sysinfo.c


Ignore:
Timestamp:
2018-01-04T20:47:53Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
facacc71
Parents:
cde999a
Message:

Wrap returns of errno from main() with EXIT_RC().

Returns of error code from main() prevent type checking when errno_t
and int are considered incompatible. In order to avoid the philosophical
discussion of what should and shouldn't be returned for main(), we simply
wrap the error values and leave the answer to the question for future
generations to decide.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sysinfo/sysinfo.c

    rcde999a r84a1a54  
    9090        fputs("')\n", stdout);
    9191       
    92         return EOK;
     92        return 0;
    9393}
    9494
     
    109109        fputs("')\n", stdout);
    110110       
    111         return EOK;
     111        return 0;
    112112}
    113113
     
    182182                        break;
    183183                case SYSINFO_VAL_VAL:
    184                         rc = print_item_val(ipath);
     184                        rc = EXIT_RC(print_item_val(ipath));
    185185                        break;
    186186                case SYSINFO_VAL_DATA:
Note: See TracChangeset for help on using the changeset viewer.