[PATCH i-g-t 06/12] lib/igt_drm_fdinfo: Stop ignoring space where not needed
Lucas De Marchi
lucas.demarchi at intel.com
Fri Apr 5 06:00:50 UTC 2024
strto[ul]l() family of functions already ignore leading spaces. There's
no need to be explicit.
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
lib/igt_drm_fdinfo.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/igt_drm_fdinfo.c b/lib/igt_drm_fdinfo.c
index 8eb5e5eed..5f05f210e 100644
--- a/lib/igt_drm_fdinfo.c
+++ b/lib/igt_drm_fdinfo.c
@@ -103,10 +103,8 @@ static int parse_engine(const char *name, struct drm_client_fdinfo *info,
}
}
- if (found >= 0) {
- p = ignore_space(p);
+ if (found >= 0)
*val = strtoull(p, NULL, 10);
- }
return found;
}
@@ -159,7 +157,6 @@ static int parse_region(const char *name, struct drm_client_fdinfo *info,
if (found < 0)
goto out;
- p = ignore_space(p);
*val = strtoull(p, NULL, 10);
p = strchr(p, ' ');
--
2.44.0
More information about the igt-dev
mailing list