From ddf3b6e5e3a4cb2b59b82bce0f5c3c74eee6bad9 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 24 May 2024 00:34:00 +0200 Subject: [PATCH] cleanup: simplier loop condition Check char for != 0. --- lib/activate/dev_manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index a7a2e98ae..c44272f1f 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -4185,7 +4185,7 @@ int get_crypt_table_offset(dev_t crypt_devt, uint32_t *offset_bytes) * [<#opt_params> ] * is reported in 512 byte sectors. */ - for (i = 0; i < strlen(params); i++) { + for (i = 0; params[i]; i++) { if (params[i] == ' ') { spaces++; if (spaces == 4)