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

    rcde999a r84a1a54  
    4040#include <ns.h>
    4141#include <stdio.h>
     42#include <stdlib.h>
    4243#include <task.h>
    4344#include <ipc/services.h>
     
    7576        if (rc != EOK) {
    7677                printf("%s: Global initialization failed\n", NAME);
    77                 return rc;
     78                return EXIT_RC(rc);
    7879        }
    7980       
     
    8283        if (rc != EOK) {
    8384                printf("%s: Failed to register file system\n", NAME);
    84                 return rc;
     85                return EXIT_RC(rc);
    8586        }
    8687       
Note: See TracChangeset for help on using the changeset viewer.