Changeset b7fd2a0 in mainline for uspace/app/loc


Ignore:
Timestamp:
2018-01-13T03:10:29Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a53ed3a
Parents:
36f0738
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.

Although this is a massive commit, it is a simple text replacement, and thus
is very easy to verify. Simply do the following:

`
git checkout <this commit's hash>
git reset HEAD
git add .
tools/srepl '\berrno_t\b' int
git add .
tools/srepl '\bsys_errno_t\b' sysarg_t
git reset
git diff
`

While this doesn't ensure that the replacements are correct, it does ensure
that the commit doesn't do anything except those replacements. Since errno_t
is typedef'd to int in the usual case (and sys_errno_t to sysarg_t), even if
incorrect, this commit cannot change behavior.

File:
1 edited

Legend:

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

    r36f0738 rb7fd2a0  
    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.