solenv/bin/concat-deps.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
New commits: commit 8e60dd94c6a7e3e3e57bfabdd0040b3d1e966285 Author: Peter Foley <[email protected]> Date: Tue Mar 5 18:36:26 2013 -0500 replace snprintf with fwrite in concat-deps As suggested by Norbert Change-Id: I1b23f2e0de8524db9e1c903863163a82a3965e41 diff --git a/solenv/bin/concat-deps.c b/solenv/bin/concat-deps.c index 5782f66..5550897 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 */ _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
