Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/tester.c

    r713ba400 r3b3fcf36  
    3535 */
    3636
    37 #include <assert.h>
    3837#include <stdio.h>
    3938#include <stddef.h>
     
    4140#include <str.h>
    4241#include <io/log.h>
    43 #include <types/casting.h>
    4442#include "tester.h"
    4543
     
    146144        }
    147145
    148         assert(can_cast_size_t_to_int(len) && "test name length overflow");
     146        unsigned int _len = (unsigned int) len;
     147        if ((_len != len) || (((int) _len) < 0)) {
     148                printf("Command length overflow\n");
     149                return;
     150        }
    149151
    150152        for (test = tests; test->name != NULL; test++)
    151                 printf("%-*s %s%s\n", (int) len, test->name, test->desc,
     153                printf("%-*s %s%s\n", _len, test->name, test->desc,
    152154                    (test->safe ? "" : " (unsafe)"));
    153155
    154         printf("%-*s Run all safe tests\n", (int) len, "*");
     156        printf("%-*s Run all safe tests\n", _len, "*");
    155157}
    156158
Note: See TracChangeset for help on using the changeset viewer.