Changeset 25a179e in mainline for uspace/lib/c/generic/dnsr.c


Ignore:
Timestamp:
2017-12-20T19:51:45Z (7 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:
f96b6c8
Parents:
d4a829e
Message:

IPC return values are always errno constants. Adjust types to reflect that.

In principle, IPC server is not allowed to return non-errno values via
the "main" return value, because kernel interprets it (e.g. EHANGUP).
It's still possible to return arbitrary additional return values alongside EOK,
which are not interpreted in normal communication.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/dnsr.c

    rd4a829e r25a179e  
    9090            sizeof(inet_addr_t), &answer_addr);
    9191       
    92         sysarg_t retval_addr;
     92        int retval_addr;
    9393        async_wait_for(req_addr, &retval_addr);
    9494       
     
    9797                async_forget(req);
    9898                free(info);
    99                 return (int) retval_addr;
     99                return retval_addr;
    100100        }
    101101       
     
    107107        dnsr_exchange_end(exch);
    108108       
    109         sysarg_t retval_cname;
     109        int retval_cname;
    110110        async_wait_for(req_cname, &retval_cname);
    111111       
     
    113113                async_forget(req);
    114114                free(info);
    115                 return (int) retval_cname;
     115                return retval_cname;
    116116        }
    117117       
    118         sysarg_t retval;
     118        int retval;
    119119        async_wait_for(req, &retval);
    120120       
     
    122122                async_forget(req);
    123123                free(info);
    124                 return (int) retval;
     124                return retval;
    125125        }
    126126       
     
    165165        }
    166166       
    167         sysarg_t retval;
     167        int retval;
    168168        async_wait_for(req, &retval);
    169169       
    170         return (int) retval;
     170        return retval;
    171171}
    172172
     
    186186        }
    187187       
    188         sysarg_t retval;
     188        int retval;
    189189        async_wait_for(req, &retval);
    190190       
    191         return (int) retval;
     191        return retval;
    192192}
    193193
Note: See TracChangeset for help on using the changeset viewer.