From: Emil Velikov Date: Thu, 29 May 2025 14:31:36 +0000 (+0100) Subject: testsuite/init_module: remove unused argument X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=a298cb0d4e633e360267f901d2798a84257e905a;p=thirdparty%2Fkmod.git testsuite/init_module: remove unused argument Ever since write_one_line_file() was introduced, it never really used its len argument. It's dead code, so just remove it. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/361 Signed-off-by: Lucas De Marchi --- diff --git a/testsuite/init_module.c b/testsuite/init_module.c index 7b344994..82942a70 100644 --- a/testsuite/init_module.c +++ b/testsuite/init_module.c @@ -106,7 +106,7 @@ static void parse_retcodes(struct mod **_modules, const char *s) } } -static int write_one_line_file(const char *fn, const char *line, int len) +static int write_one_line_file(const char *fn, const char *line) { FILE *f; int r; @@ -152,7 +152,7 @@ static int create_sysfs_files(const char *modname) assert(mkdir_p(buf, len, 0755) >= 0); strcpy(buf + len, "/initstate"); - return write_one_line_file(buf, "live\n", strlen("live\n")); + return write_one_line_file(buf, "live\n"); } static struct mod *find_module(struct mod *_modules, const char *modname)