Skip to content
This repository has been archived by the owner on Apr 22, 2018. It is now read-only.

Commit

Permalink
examples/client.c: fix error messages that were giving the wrong info…
Browse files Browse the repository at this point in the history
…rmation about the source of the problem
  • Loading branch information
Henrique Silva committed Jan 15, 2015
1 parent 9e84529 commit 24f4359
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,30 +1490,30 @@ int main (int argc, char *argv [])

//Check if the board number is within range and set to default if necessary
if (board_number_str == NULL) {
fprintf (stderr, "[client:leds]: Setting default value to BOARD number: %u\n",
fprintf (stderr, "[client]: Setting default value to BOARD number: %u\n",
DFLT_BOARD_NUMBER);
board_number = DFLT_BOARD_NUMBER;
}
else {
board_number = strtoul (board_number_str, NULL, 10);
if (board_number > MAX_BOARD_NUMBER) {
fprintf (stderr, "[client:leds]: BOARD number too big! Defaulting to: %u\n",
fprintf (stderr, "[client]: BOARD number too big! Defaulting to: %u\n",
MAX_BOARD_NUMBER);
board_number = MAX_BOARD_NUMBER;
}
}

//Check if the bpm number is within range and set to default if necessary
if (bpm_number_str == NULL) {
fprintf (stderr, "[client:leds]: Setting default value to BPM number: %u\n",
fprintf (stderr, "[client]: Setting default value to BPM number: %u\n",
DFLT_BPM_NUMBER);
bpm_number = DFLT_BPM_NUMBER;
}
else {
bpm_number = strtoul (bpm_number_str, NULL, 10);

if (bpm_number > MAX_BPM_NUMBER) {
fprintf (stderr, "[client:leds]: BPM number too big! Defaulting to: %u\n",
fprintf (stderr, "[client]: BPM number too big! Defaulting to: %u\n",
MAX_BPM_NUMBER);
bpm_number = MAX_BPM_NUMBER;
}
Expand Down

0 comments on commit 24f4359

Please sign in to comment.