Changeset 84a1a54 in mainline for uspace/srv/hid/remcons/remcons.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/srv/hid/remcons/remcons.c

    rcde999a r84a1a54  
    353353        if (rc != EOK) {
    354354                fprintf(stderr, "%s: Unable to register server\n", NAME);
    355                 return rc;
     355                return EXIT_RC(rc);
    356356        }
    357357
     
    359359        if (rc != EOK) {
    360360                fprintf(stderr, "%s: Error initializing TCP.\n", NAME);
    361                 return rc;
     361                return EXIT_RC(rc);
    362362        }
    363363
     
    369369        if (rc != EOK) {
    370370                fprintf(stderr, "%s: Error creating listener.\n", NAME);
    371                 return rc;
     371                return EXIT_RC(rc);
    372372        }
    373373
Note: See TracChangeset for help on using the changeset viewer.