Loading drivers/scsi/scsi_debug.c +3 −14 Original line number Diff line number Diff line Loading @@ -2682,20 +2682,9 @@ static ssize_t sdebug_add_host_store(struct device_driver * ddp, const char * buf, size_t count) { int delta_hosts; char work[20]; if (1 != sscanf(buf, "%10s", work)) return -EINVAL; { /* temporary hack around sscanf() problem with -ve nums */ int neg = 0; if ('-' == *work) neg = 1; if (1 != sscanf(work + neg, "%d", &delta_hosts)) if (sscanf(buf, "%d", &delta_hosts) != 1) return -EINVAL; if (neg) delta_hosts = -delta_hosts; } if (delta_hosts > 0) { do { sdebug_add_adapter(); Loading Loading
drivers/scsi/scsi_debug.c +3 −14 Original line number Diff line number Diff line Loading @@ -2682,20 +2682,9 @@ static ssize_t sdebug_add_host_store(struct device_driver * ddp, const char * buf, size_t count) { int delta_hosts; char work[20]; if (1 != sscanf(buf, "%10s", work)) return -EINVAL; { /* temporary hack around sscanf() problem with -ve nums */ int neg = 0; if ('-' == *work) neg = 1; if (1 != sscanf(work + neg, "%d", &delta_hosts)) if (sscanf(buf, "%d", &delta_hosts) != 1) return -EINVAL; if (neg) delta_hosts = -delta_hosts; } if (delta_hosts > 0) { do { sdebug_add_adapter(); Loading