Changeset 08e103d4 in mainline for uspace/lib/drv


Ignore:
Timestamp:
2019-02-05T18:26:05Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
1d2f85e
Parents:
d066259
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 16:16:55)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-05 18:26:05)
Message:

Use clearer naming for string length functions

This and the following commit change the names of functions, as well as
their documentation, to use unambiguous terms "bytes" and "code points"
instead of ambiguous terms "size", "length", and "characters".

Location:
uspace/lib/drv/generic
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/logbuf.c

    rd066259 r08e103d4  
    105105
    106106        size_t dump_itself = item_size * 2 * items;
    107         size_t group_spaces = str_size(SPACE_GROUP) * group_space_count;
    108         size_t normal_spaces = str_size(SPACE_NORMAL) * normal_space_count;
     107        size_t group_spaces = str_bytes(SPACE_GROUP) * group_space_count;
     108        size_t normal_spaces = str_bytes(SPACE_NORMAL) * normal_space_count;
    109109
    110110        return dump_itself + group_spaces + normal_spaces;
     
    193193
    194194        if (print_remainder && (index < items)) {
    195                 size_t s = str_size(dump);
     195                size_t s = str_bytes(dump);
    196196                snprintf(dump + s, dump_size - s, REMAINDER_STR_FMT,
    197197                    items - index);
  • uspace/lib/drv/generic/remote_ahci.c

    rd066259 r08e103d4  
    7070                return NULL;
    7171
    72         size_t devn_size = str_size(devn);
     72        size_t devn_size = str_bytes(devn);
    7373
    7474        if ((devn_size > 5) && (str_lcmp(devn, "ahci_", 5) == 0)) {
  • uspace/lib/drv/generic/remote_audio_mixer.c

    rd066259 r08e103d4  
    234234        unsigned items = 0;
    235235        const errno_t ret = mixer_iface->get_info(fun, &name, &items);
    236         const size_t name_size = name ? str_size(name) + 1 : 0;
     236        const size_t name_size = name ? str_bytes(name) + 1 : 0;
    237237        async_answer_2(icall, ret, name_size, items);
    238238
     
    269269        unsigned values = 0;
    270270        const errno_t ret = mixer_iface->get_item_info(fun, item, &name, &values);
    271         const size_t name_size = name ? str_size(name) + 1 : 0;
     271        const size_t name_size = name ? str_bytes(name) + 1 : 0;
    272272        async_answer_2(icall, ret, name_size, values);
    273273
  • uspace/lib/drv/generic/remote_audio_pcm.c

    rd066259 r08e103d4  
    646646        const char *name = NULL;
    647647        const errno_t ret = pcm_iface->get_info_str(fun, &name);
    648         const size_t name_size = name ? str_size(name) + 1 : 0;
     648        const size_t name_size = name ? str_bytes(name) + 1 : 0;
    649649        async_answer_1(call, ret, name_size);
    650650
  • uspace/lib/drv/generic/remote_ieee80211.c

    rd066259 r08e103d4  
    138138
    139139        errno_t rc = async_data_write_start(exch, ssid_start,
    140             str_size(ssid_start) + 1);
     140            str_bytes(ssid_start) + 1);
    141141        if (rc != EOK) {
    142142                async_exchange_end(exch);
     
    153153                password = (char *) "";
    154154
    155         rc = async_data_write_start(exch, password, str_size(password) + 1);
     155        rc = async_data_write_start(exch, password, str_bytes(password) + 1);
    156156        if (rc != EOK) {
    157157                async_exchange_end(exch);
Note: See TracChangeset for help on using the changeset viewer.