1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fixed unclosed file

This commit is contained in:
Steffen Vogel 2016-06-13 17:19:47 +02:00
parent 277589029e
commit 5ffb16ec8f

View file

@ -29,13 +29,12 @@ int kernel_module_set_param(const char *module, const char *param, const char *v
snprintf(fn, sizeof(fn), "%s/module/%s/parameters/%s", SYSFS_PATH, module, param);
f = fopen(fn, "w");
if (f) {
debug(DBG_SOCKET | 5, "Set parameter %s of kernel module %s to %s", module, param, value);
fprintf(f, "%s", value);
fclose(f);
}
else
if (!f)
serror("Failed set parameter %s for kernel module %s to %s", module, param, value);
debug(5, "Set parameter %s of kernel module %s to %s", module, param, value);
fprintf(f, "%s", value);
fclose(f);
return 0;
}