summaryrefslogtreecommitdiff
path: root/solenv/bin/concat-deps.c
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2013-03-05 18:36:26 -0500
committerPeter Foley <pefoley2@verizon.net>2013-03-05 18:38:50 -0500
commit8e60dd94c6a7e3e3e57bfabdd0040b3d1e966285 (patch)
tree9eafb9a6e0be6ee711714a347797a4fbc7eb13b5 /solenv/bin/concat-deps.c
parent185b6251436ef03e314295e4fff8fcfae0d656b2 (diff)
replace snprintf with fwrite in concat-deps
As suggested by Norbert Change-Id: I1b23f2e0de8524db9e1c903863163a82a3965e41
Diffstat (limited to 'solenv/bin/concat-deps.c')
-rw-r--r--solenv/bin/concat-deps.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c
index 5782f66e10b2..5550897a7f92 100644
--- a/solenv/bin/concat-deps.c
+++ b/solenv/bin/concat-deps.c
@@ -774,21 +774,10 @@ static void emit_single_boost_header(void)
fprintf(stdout, "%s" BOOST_TARGET " ", work_dir);
}
-static void emit_unpacked_target(char const*const token, char const*const end)
+static void emit_unpacked_target(const char* token, const char* end)
{
- /* is there some obvious way to printf N characters that i'm missing? */
- size_t size = end - token + 1;
- char* tmp=(char *)malloc(size*sizeof(char));
- #ifdef _MSC_VER
- // MSVC _snprintf doesn't null terminate strings
- _snprintf(tmp, size, "%s", token);
- tmp[size-1]='\0';
- #else
- snprintf(tmp, size, "%s", token);
- #endif
- fputs(tmp, stdout);
+ fwrite(token, 1, end-token, stdout);
fputs(".done ", stdout);
- free(tmp);
}
/* prefix paths to absolute */