Changeset 46577995 in mainline for uspace/app/loc


Ignore:
Timestamp:
2018-01-04T20:50:52Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
e211ea04
Parents:
facacc71
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

After this commit, HelenOS is free of code that mixes error codes with non-error
values on the assumption that error codes are negative.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/loc/loc.c

    rfacacc71 r46577995  
    4343#define NAME "loc"
    4444
    45 static int show_cat(const char *cat_name, category_id_t cat_id)
     45static errno_t show_cat(const char *cat_name, category_id_t cat_id)
    4646{
    4747        service_id_t *svc_ids;
     
    4949        char *svc_name;
    5050        char *server_name;
    51         int rc;
     51        errno_t rc;
    5252        size_t j;
    5353
     
    9090}
    9191
    92 static int list_svcs_by_cat(void)
     92static errno_t list_svcs_by_cat(void)
    9393{
    9494        category_id_t *cat_ids;
     
    9797        size_t i;
    9898        char *cat_name;
    99         int rc;
     99        errno_t rc;
    100100
    101101        rc = loc_get_categories(&cat_ids, &cat_cnt);
     
    136136int main(int argc, char *argv[])
    137137{
    138         int rc;
     138        errno_t rc;
    139139        char *cmd;
    140140        char *cat_name;
Note: See TracChangeset for help on using the changeset viewer.