Changeset 4f4018b in mainline for uspace/lib/http/src/request.c


Ignore:
Timestamp:
2019-02-05T15:25:50Z (6 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:
cca2d93b
Parents:
472fe7a
Message:

Do not misuse printf_size() to estimate byte size of output

The incorrectly named function actually counts unicode code
points.

File:
1 edited

Legend:

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

    r472fe7a r4f4018b  
    8282    const char *method, const char *path)
    8383{
    84         if (buf == NULL) {
    85                 return printf_size(HTTP_METHOD_LINE, method, path);
    86         } else {
    87                 return snprintf(buf, buf_size, HTTP_METHOD_LINE, method, path);
    88         }
     84        return snprintf(buf, buf_size, HTTP_METHOD_LINE, method, path);
    8985}
    9086
Note: See TracChangeset for help on using the changeset viewer.