Skip to contentSkip to conversation

scsi: lpfc: Use isdigit() in lpfc_wwn_set()

PATCH New Thorsten Blum 1 participant 1 message Nov 5

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: lpfc: Use isdigit() in lpfc_wwn_set()

Use isdigit() to replace the open-coded implementation.

---
 drivers/scsi/lpfc/lpfc_attr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/lpfc/lpfc_attr.c +1 -1
index bb5c84f0b787..4ae113002af4 100644
@@ -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;