Changeset 08e103d4 in mainline for uspace/lib/http/src


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/http/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/http/src/request.c

    rd066259 r08e103d4  
    100100                size += header_size;
    101101        }
    102         size += str_length(HTTP_REQUEST_LINE);
     102        size += str_code_points(HTTP_REQUEST_LINE);
    103103
    104104        char *buf = malloc(size);
     
    126126        }
    127127
    128         size_t rlsize = str_size(HTTP_REQUEST_LINE);
     128        size_t rlsize = str_bytes(HTTP_REQUEST_LINE);
    129129        memcpy(pos, HTTP_REQUEST_LINE, rlsize);
    130130        pos_size -= rlsize;
  • uspace/lib/http/src/response.c

    rd066259 r08e103d4  
    100100        if (rc != EOK)
    101101                return rc;
    102         if (ndisc < str_length(expect))
     102        if (ndisc < str_code_points(expect))
    103103                return HTTP_EPARSE;
    104104        return EOK;
Note: See TracChangeset for help on using the changeset viewer.