improve parsing of stepbytes (increment size) argument

[ROCm/rccl-tests commit: 746549b28d]
Этот коммит содержится в:
Stefano Salsano
2024-06-14 11:28:55 +02:00
коммит произвёл GitHub
родитель 1922bd71cb
Коммит a0e06f2133
+6 -1
Просмотреть файл
@@ -764,7 +764,12 @@ int main(int argc, char* argv[]) {
maxBytes = (size_t)parsed;
break;
case 'i':
stepBytes = strtol(optarg, NULL, 0);
parsed = parsesize(optarg);
if (parsed < 0) {
fprintf(stderr, "invalid size specified for 'stepBytes'\n");
return -1;
}
stepBytes = (size_t)parsed;
break;
case 'f':
stepFactor = strtol(optarg, NULL, 0);