Skip to content

Commit

Permalink
regulatory: remove redundant isalpha() check
Browse files Browse the repository at this point in the history
toupper() only modifies lower-case letters, so
the isalpha() check is redundant; remove it.

Acked-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Jan 3, 2013
1 parent 11cff96 commit d4f2c88
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1614,10 +1614,8 @@ static void reg_todo(struct work_struct *work)

static void queue_regulatory_request(struct regulatory_request *request)
{
if (isalpha(request->alpha2[0]))
request->alpha2[0] = toupper(request->alpha2[0]);
if (isalpha(request->alpha2[1]))
request->alpha2[1] = toupper(request->alpha2[1]);
request->alpha2[0] = toupper(request->alpha2[0]);
request->alpha2[1] = toupper(request->alpha2[1]);

spin_lock(&reg_requests_lock);
list_add_tail(&request->list, &reg_requests_list);
Expand Down

0 comments on commit d4f2c88

Please sign in to comment.