Changeset 84a1a54 in mainline for uspace/srv/locsrv/locsrv.c


Ignore:
Timestamp:
2018-01-04T20:47:53Z (7 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/locsrv/locsrv.c

    rcde999a r84a1a54  
    15321532        if (rc != EOK) {
    15331533                printf("%s: Error while creating supplier port: %s\n", NAME, str_error(rc));
    1534                 return rc;
     1534                return EXIT_RC(rc);
    15351535        }
    15361536       
     
    15391539        if (rc != EOK) {
    15401540                printf("%s: Error while creating consumer port: %s\n", NAME, str_error(rc));
    1541                 return rc;
     1541                return EXIT_RC(rc);
    15421542        }
    15431543       
     
    15491549        if (rc != EOK) {
    15501550                printf("%s: Error while registering service: %s\n", NAME, str_error(rc));
    1551                 return rc;
     1551                return EXIT_RC(rc);
    15521552        }
    15531553       
Note: See TracChangeset for help on using the changeset viewer.