Skip to content

Commit

Permalink
Get rid of some no-longer-necessary casts.
Browse files Browse the repository at this point in the history
g_ascii_isXXX() can be handed a char value safely; they won't try to use
it as an index into a table before checking it.

Change-Id: Icf80163fb5f9dccd0b97917e318b1db0bf3e0cf8
Reviewed-on: https://code.wireshark.org/review/4801
Reviewed-by: Guy Harris <guy@alum.mit.edu>
  • Loading branch information
guyharris committed Oct 17, 2014
1 parent a91799e commit e3477bd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions capture_opts.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ set_autostop_criterion(capture_options *capture_opts, const char *autostoparg)
* as we allow it in the preferences file, we might as well
* allow it here).
*/
while (g_ascii_isspace((guchar)*p))
while (g_ascii_isspace(*p))
p++;
if (*p == '\0') {
/*
Expand Down Expand Up @@ -309,7 +309,7 @@ get_ring_arguments(capture_options *capture_opts, const char *arg)
* as we allow it in the preferences file, we might as well
* allow it here).
*/
while (g_ascii_isspace((guchar)*p))
while (g_ascii_isspace(*p))
p++;
if (*p == '\0') {
/*
Expand Down Expand Up @@ -355,7 +355,7 @@ get_sampling_arguments(capture_options *capture_opts, const char *arg)
p = colonp;
*p++ = '\0';

while (g_ascii_isspace((guchar)*p))
while (g_ascii_isspace(*p))
p++;
if (*p == '\0') {
*colonp = ':';
Expand Down Expand Up @@ -413,7 +413,7 @@ get_auth_arguments(capture_options *capture_opts, const char *arg)
p = colonp;
*p++ = '\0';

while (g_ascii_isspace((guchar)*p))
while (g_ascii_isspace(*p))
p++;

if (capture_opts->ifaces->len > 0) {
Expand Down

0 comments on commit e3477bd

Please sign in to comment.