Changeset 4f4018b in mainline for uspace/lib/http/src/headers.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/headers.c

    r472fe7a r4f4018b  
    8585{
    8686        /* TODO properly split long header values */
    87         if (buf == NULL) {
    88                 return printf_size(HTTP_HEADER_LINE, header->name, header->value);
    89         } else {
    90                 return snprintf(buf, buf_size,
    91                     HTTP_HEADER_LINE, header->name, header->value);
    92         }
     87        return snprintf(buf, buf_size,
     88            HTTP_HEADER_LINE, header->name, header->value);
    9389}
    9490
Note: See TracChangeset for help on using the changeset viewer.