mirror of https://github.com/ARMmbed/mbed-os.git
Restricting IPV4 echo tests to chars 0-9.
Having the echo tests generate any random character caused issues serializing the test output into an xml file. This change limits the characters generated by the device to '0' - '9'.pull/2332/head
parent
5f43f18ba3
commit
c355fb16d4
|
|
@ -21,7 +21,7 @@ namespace {
|
|||
|
||||
void prep_buffer(char *tx_buffer, size_t tx_size) {
|
||||
for (size_t i=0; i<tx_size; ++i) {
|
||||
tx_buffer[i] = (rand() % ASCII_MAX) + ' ' + 1;
|
||||
tx_buffer[i] = (rand() % 10) + '0';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ namespace {
|
|||
|
||||
void prep_buffer(char *tx_buffer, size_t tx_size) {
|
||||
for (size_t i=0; i<tx_size; ++i) {
|
||||
tx_buffer[i] = (rand() % ASCII_MAX) + ' ' + 1;
|
||||
tx_buffer[i] = (rand() % 10) + '0';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue