scsi: lpfc: Use isdigit() in lpfc_wwn_set()
Subsystems (2)
PATCH 1/1 scsi: lpfc: Use isdigit() in lpfc_wwn_set()
Use isdigit() to replace the open-coded implementation.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/scsi/lpfc/lpfc_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_attr.c +1 -1
@@ -3082,7 +3082,7 @@ lpfc_wwn_set(const char *buf, size_t cnt, char wwn[]) j = ((j <<4 ) | ((*buf++ -'a' ) +10 )); else if ((*buf >= 'A') && (*buf <= 'F')) j = ((j <<4 ) | ((*buf++ -'A' ) +10 )); - else if ((*buf >= '0') && (*buf <= '9')) + else if (isdigit(*buf)) j = ((j <<4 ) | (*buf++ -'0' )); else return -EINVAL;