Changeset be12474 in mainline


Ignore:
Timestamp:
2015-08-30T14:52:08Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cb0ca35
Parents:
df13836
Message:

Revisit a few uses of list_count, list_nth w.r.t. type used for object count.

Location:
uspace
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/mm/common.c

    rdf13836 rbe12474  
    309309                return NULL;
    310310       
    311         unsigned int idx = rand() % mem_blocks_count;
     311        unsigned long idx = rand() % mem_blocks_count;
    312312        link_t *entry = list_nth(&mem_blocks, idx);
    313313       
  • uspace/lib/c/generic/devman.c

    rdf13836 rbe12474  
    217217    match_id_list_t *match_ids, devman_handle_t devh, devman_handle_t *funh)
    218218{
    219         int match_count = list_count(&match_ids->ids);
     219        unsigned long match_count = list_count(&match_ids->ids);
    220220        async_exch_t *exch = devman_exchange_begin_blocking(INTERFACE_DDF_DRIVER);
    221221       
  • uspace/srv/audio/hound/hound.c

    rdf13836 rbe12474  
    420420
    421421        fibril_mutex_lock(&hound->list_guard);
    422         const size_t count = list_count(&hound->sources);
     422        const unsigned long count = list_count(&hound->sources);
    423423        if (count == 0) {
    424424                *list = NULL;
     
    429429        const char **names = calloc(count, sizeof(char *));
    430430        int ret = names ? EOK : ENOMEM;
    431         for (size_t i = 0; i < count && ret == EOK; ++i) {
     431        for (unsigned long i = 0; i < count && ret == EOK; ++i) {
    432432                link_t *slink = list_nth(&hound->sources, i);
    433433                audio_source_t *source = audio_source_list_instance(slink);
  • uspace/srv/net/tcp/service.c

    rdf13836 rbe12474  
    11321132{
    11331133        tcp_cconn_t *cconn;
    1134         size_t n;
     1134        unsigned long n;
    11351135
    11361136        n = list_count(&client->cconn);
  • uspace/srv/net/udp/service.c

    rdf13836 rbe12474  
    627627{
    628628        udp_client_t client;
    629         size_t n;
     629        unsigned long n;
    630630
    631631        /* Accept the connection */
Note: See TracChangeset for help on using the changeset viewer.