aboutsummaryrefslogtreecommitdiff
path: root/stty.c
diff options
context:
space:
mode:
Diffstat (limited to 'stty.c')
-rw-r--r--stty.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/stty.c b/stty.c
index 0fc0bfbc2..4a5aecf1d 100644
--- a/stty.c
+++ b/stty.c
@@ -1302,10 +1302,9 @@ static const int NUM_SPEEDS = (sizeof(speeds) / sizeof(struct speed_map));
1302static speed_t string_to_baud(const char *arg) 1302static speed_t string_to_baud(const char *arg)
1303{ 1303{
1304 int i; 1304 int i;
1305 static const struct suffix_mult stty_zerosuff = { NULL, 0 };
1306 1305
1307 for (i = 0; i < NUM_SPEEDS; ++i) 1306 for (i = 0; i < NUM_SPEEDS; ++i)
1308 if (parse_number(arg, &stty_zerosuff) == speeds[i].value) 1307 if (parse_number(arg, 0) == speeds[i].value)
1309 return speeds[i].speed; 1308 return speeds[i].speed;
1310 return (speed_t) - 1; 1309 return (speed_t) - 1;
1311} 1310}