Changeset 904b1bc in mainline for uspace/lib/drv/generic/logbuf.c


Ignore:
Timestamp:
2018-05-22T10:36:58Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a4eb3ba2
Parents:
4f8772d4
git-author:
Jiri Svoboda <jiri@…> (2018-05-21 17:36:30)
git-committer:
Jiri Svoboda <jiri@…> (2018-05-22 10:36:58)
Message:

Fix remaining ccheck issues.

File:
1 edited

Legend:

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

    r4f8772d4 r904b1bc  
    4040#define REMAINDER_STR_FMT " (%zu)..."
    4141/** Expected max size of the remainder string.
    42  * String + terminator + number width (enough for 4GB).*/
     42 * String + terminator + number width (enough for 4GB).
     43 */
    4344#define REMAINDER_STR_LEN (5 + 1 + 10)
    4445
     
    5051/** Space between two groups. */
    5152#define SPACE_GROUP "  "
     53
     54/** Formats the dump with space before, takes care of type casting (ugly). */
     55#define _FORMAT(digits, bits) \
     56        snprintf(dump, dump_size, "%s%0" #digits PRIx##bits, \
     57            space_before, ((uint##bits##_t *)buf)[0]);
    5258
    5359/** Dump one item into given buffer.
     
    7783        buf += index * item_size;
    7884
    79 /* Formats the dump with space before, takes care of type casting (ugly). */
    80 #define _FORMAT(digits, bits) \
    81         snprintf(dump, dump_size, "%s%0" #digits PRIx##bits, \
    82             space_before, ((uint##bits##_t *)buf)[0]);
    83 
    8485        switch (item_size) {
    8586        case 4:
     
    9091                return _FORMAT(2, 8);
    9192        }
    92 #undef _FORMAT
    9393}
    9494
Note: See TracChangeset for help on using the changeset viewer.