aboutsummaryrefslogtreecommitdiff
path: root/src/lib/delivery/delivery_docker.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/delivery/delivery_docker.c')
-rw-r--r--src/lib/delivery/delivery_docker.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/lib/delivery/delivery_docker.c b/src/lib/delivery/delivery_docker.c
index 6aa977a..1178a8c 100644
--- a/src/lib/delivery/delivery_docker.c
+++ b/src/lib/delivery/delivery_docker.c
@@ -46,10 +46,7 @@ int delivery_docker(struct Delivery *ctx) {
char *tag_orig = strlist_item(ctx->deploy.docker.tags, i);
strncpy(tag, tag_orig, sizeof(tag) - 1);
docker_sanitize_tag(tag);
-
- const char *tag_fmt = " -t \"%s\" ";
- const int tag_fmt_len = snprintf(NULL, 0, tag_fmt, tag);
- snprintf(args + strlen(args), sizeof(args) - strlen(args) - tag_fmt_len, tag_fmt, tag);
+ snprintf(args + strlen(args), sizeof(args) - strlen(args), " -t \"%s\" ", tag);
}
// Append build arguments to command (i.e. --build-arg "key=value"
@@ -58,10 +55,7 @@ int delivery_docker(struct Delivery *ctx) {
if (!build_arg) {
break;
}
-
- const char *build_arg_fmt = " --build-arg \"%s\" ";
- const int build_arg_fmt_len = snprintf(NULL, 0, build_arg_fmt, build_arg);
- snprintf(args + strlen(args), sizeof(args) - strlen(args) - build_arg_fmt_len, build_arg_fmt, build_arg);
+ snprintf(args + strlen(args), sizeof(args) - strlen(args), " --build-arg \"%s\" ", build_arg);
}
// Build the image