Ignore:
Timestamp:
2018-03-10T22:55:07Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
850fd32
Parents:
5ef16903
Message:

Gratuitous nested block makes ccheck sad.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/dist/src/c/demos/top/screen.c

    r5ef16903 r338d54a7  
    4545#include <inttypes.h>
    4646#include <macros.h>
     47#include <str.h>
    4748#include "screen.h"
    4849#include "top.h"
     
    389390                int width = table->columns[column_index].width;
    390391                field_t *field = &table->fields[i];
     392                uint64_t val;
     393                const char *psuffix;
     394                char suffix;
    391395
    392396                if (column_index != 0) {
     
    406410                        printf("%*" PRIu64, width, field->uint);
    407411                        break;
    408                 case FIELD_UINT_SUFFIX_BIN: {
    409                         uint64_t val = field->uint;
    410                         const char *suffix;
     412                case FIELD_UINT_SUFFIX_BIN:
     413                        val = field->uint;
    411414                        width -= 3;
    412                         bin_order_suffix(val, &val, &suffix, true);
    413                         printf("%*" PRIu64 "%s", width, val, suffix);
    414                         break;
    415                 }
    416                 case FIELD_UINT_SUFFIX_DEC: {
    417                         uint64_t val = field->uint;
    418                         char suffix;
     415                        bin_order_suffix(val, &val, &psuffix, true);
     416                        printf("%*" PRIu64 "%s", width, val, psuffix);
     417                        break;
     418                case FIELD_UINT_SUFFIX_DEC:
     419                        val = field->uint;
    419420                        width -= 1;
    420421                        order_suffix(val, &val, &suffix);
    421422                        printf("%*" PRIu64 "%c", width, val, suffix);
    422423                        break;
    423                 }
    424424                case FIELD_PERCENT:
    425425                        width -= 5; /* nnn.% */
     
    537537 *
    538538 */
    539 errno_t tgetchar(unsigned int sec)
     539int tgetchar(unsigned int sec)
    540540{
    541541        /*
Note: See TracChangeset for help on using the changeset viewer.