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
Brian Daniels 2016-08-01 16:48:17 -05:00
parent 5f43f18ba3
commit c355fb16d4
2 changed files with 2 additions and 2 deletions

View File

@ -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';
}
}

View File

@ -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';
}
}