From e06d0f85845165d3d9333fe9e98deade672cd4c8 Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 10 Apr 2006 04:44:21 +0000 Subject: 2006-04-09 Martin Hunt * print.c (_stp_print_flush): Send 'len" bytes instead of 'len+1', which included terminating 0. * string.c (_stp_sprintf): Call _stp_vsnprintf() instead of vsnprintf(). (_stp_vsprintf): Ditto. * vsprintf.c: New file. --- runtime/print.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/print.c') diff --git a/runtime/print.c b/runtime/print.c index fc3cf058..9addde60 100644 --- a/runtime/print.c +++ b/runtime/print.c @@ -1,6 +1,6 @@ /* -*- linux-c -*- * Print Functions - * Copyright (C) 2005 Red Hat Inc. + * Copyright (C) 2005, 2006 Red Hat Inc. * * This file is part of systemtap, and is free software. You can * redistribute it and/or modify it under the terms of the GNU General @@ -14,6 +14,7 @@ #include #include "string.h" #include "io.c" +#include "vsprintf.c" /** @file print.c * Printing Functions. @@ -55,7 +56,7 @@ void _stp_print_flush (void) if (len == 0) return; - ret =_stp_transport_write(buf, len + 1); + ret =_stp_transport_write(buf, len); if (unlikely(ret < 0)) { #if 0 if (!atomic_read(&_stp_transport_failures)) -- cgit