X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fconf.c;h=5d5c46c144dd14fcd8576f2393a07cdf770a5ed9;hp=771abe58600ca788b6dbc19ab929a2c6e444b17b;hb=b5a8aaba0ae78e93f8a972c9c7911fc2bc664b4e;hpb=87d6dff00480a9d354f8b4ade6dfa41cb06118cb diff --git a/src/conf.c b/src/conf.c index 771abe58..5d5c46c1 100644 --- a/src/conf.c +++ b/src/conf.c @@ -431,12 +431,12 @@ bool modify_config_file(struct meshlink_handle *mesh, const char *name, const ch char tmpname[PATH_MAX]; bool error = false; - if (snprintf(filename, sizeof(filename), "%s" SLASH "hosts" SLASH "%s", mesh->confbase, name) >= PATH_MAX) { + if(snprintf(filename, sizeof(filename), "%s" SLASH "hosts" SLASH "%s", mesh->confbase, name) >= PATH_MAX) { logger(mesh, MESHLINK_ERROR, "Filename too long: %s" SLASH "hosts" SLASH "%s", mesh->confbase, name); return false; } - if (snprintf(tmpname, sizeof(tmpname), "%s.tmp", filename) >= PATH_MAX) { + if(snprintf(tmpname, sizeof(tmpname), "%s.tmp", filename) >= PATH_MAX) { logger(mesh, MESHLINK_ERROR, "Filename too long: %s.tmp", filename); return false; }