Changeset 84a1a54 in mainline for uspace/srv/net


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

Location:
uspace/srv/net
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/loopip/loopip.c

    rcde999a r84a1a54  
    253253        if (rc != EOK) {
    254254                printf("%s: Failed to initialize logging: %s.\n", NAME, str_error(rc));
    255                 return rc;
     255                return EXIT_RC(rc);
    256256        }
    257257       
     
    259259        if (rc != EOK) {
    260260                printf("%s: Failed to initialize loopip: %s.\n", NAME, str_error(rc));
    261                 return rc;
     261                return EXIT_RC(rc);
    262262        }
    263263       
  • uspace/srv/net/slip/slip.c

    rcde999a r84a1a54  
    421421        if (argc != 3) {
    422422                usage();
    423                 return EINVAL;
     423                return EXIT_RC(EINVAL);
    424424        }
    425425
     
    427427        if (rc != EOK) {
    428428                printf(NAME ": failed to initialize log\n");
    429                 return rc;
     429                return EXIT_RC(rc);
    430430        }
    431431
Note: See TracChangeset for help on using the changeset viewer.