Changeset 84a1a54 in mainline for uspace/srv/audio/hound/main.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/audio/hound/main.c

    rcde999a r84a1a54  
    8080                log_fatal("Failed to initialize hound structure: %s",
    8181                    str_error(ret));
    82                 return -ret;
     82                return EXIT_RC(ret);
    8383        }
    8484
     
    9191        if (ret != EOK) {
    9292                log_fatal("Failed to register server: %s", str_error(ret));
    93                 return -ret;
     93                return EXIT_RC(ret);
    9494        }
    9595
     
    9999                    str_error(ret));
    100100                hound_server_unregister(id);
    101                 return -ret;
     101                return EXIT_RC(ret);
    102102        }
    103103        log_info("Running with service id %" PRIun, id);
Note: See TracChangeset for help on using the changeset viewer.