avoid usage of snprintf()

We have a nice little abstraction for snprintf with covering the case
that a string is too big for the target buffer – let's use that!
This commit is contained in:
Christian Kruse
2014-03-06 18:11:04 +01:00
parent 164cf9d08f
commit 9eba986833
3 changed files with 11 additions and 15 deletions

View File

@@ -281,7 +281,7 @@ main(int argc, char **argv)
}
}
snprintf(repmgr_schema, MAXLEN, "%s%s", DEFAULT_REPMGR_SCHEMA_PREFIX,
xsnprintf(repmgr_schema, MAXLEN, "%s%s", DEFAULT_REPMGR_SCHEMA_PREFIX,
local_options.cluster_name);
log_info(_("%s Connecting to database '%s'\n"), progname,