From patchwork Fri Apr 21 00:49:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Matlack X-Patchwork-Id: 9691525 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C3EE6038D for ; Fri, 21 Apr 2017 00:50:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EA0A2847B for ; Fri, 21 Apr 2017 00:50:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03B8A28480; Fri, 21 Apr 2017 00:50:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB7422847B for ; Fri, 21 Apr 2017 00:50:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1034195AbdDUAui (ORCPT ); Thu, 20 Apr 2017 20:50:38 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:36392 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033992AbdDUAu2 (ORCPT ); Thu, 20 Apr 2017 20:50:28 -0400 Received: by mail-io0-f178.google.com with SMTP id o22so104074229iod.3 for ; Thu, 20 Apr 2017 17:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=xZFecZxDYyCV+rd79NVg64j0/Vak1vSXmuN4E15Encs=; b=qDp7fMxgOKxVtVuqVG7BdsH5P1RHKilI//0G2Jo7D479vmhHq0U0o3TsP/jHJjhM3E RU/USxQf/7JMmVB8mI5IsifLzOe1F2azD0S5V7c8g1YiRfXeAoOQqESRDmPox1UJUpFE O7Q05ouq7Zu+ZOsTp8Wwsx2k/vb4WnWBnef0RHCc+2DqJvmy3eYqxQp8rDjaJi9IeeUW /JKhUaM0ZM49SOvOha3SYtvp4kSe/jLglx2rLjLD8N++GTgAdZgYYWVZbUkyMFItg8QG O1SG53Yn4jaLOgdPy+QPTFYldvqQ9DQRx1YKPPx9al3kyOVh5KuhQI+P0t2SAwffX+qF sLPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xZFecZxDYyCV+rd79NVg64j0/Vak1vSXmuN4E15Encs=; b=iX8zscBQn6VSUOThiGmrwp/cai8XmhLJ3aOPNLGl4G0Y5++oBLxUBJeKf2zhS0Zo3X o1fR5RgqS+/ruCZvOxEvrs8YXjL0LUEvKa3QgYeaLLHWfTdJc10pJ6xPGrDWDkoASGtI dAObaTtPHR62j7/xF+9gwCfVi8SrGx9Go7mZiL+0wSwd3N5NkZto2y4Q4tu9Mf6clsin QLGGTOehfBaS5AHB9/5+XkratSW9Sr661WegO7l/TJAGg7TQ2QM9mQafCJUUdPu2fNGb ZFun5GPob++V/q2lJp0QfWS35l+fvjGyU6CrSYSF3uR7AJmA20RyUFlOcGwce38lx+58 dvUw== X-Gm-Message-State: AN3rC/6ufOC65vuGdhimETbV1pGrn3Enh0qR9l9ECYxCMbVZGmhgVWuc M2IKwtD7HvTp9Yxz X-Received: by 10.98.26.70 with SMTP id a67mr10222912pfa.117.1492735827568; Thu, 20 Apr 2017 17:50:27 -0700 (PDT) Received: from dmatlack.sea.corp.google.com ([100.100.206.82]) by smtp.gmail.com with ESMTPSA id e13sm12466486pfb.30.2017.04.20.17.50.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Apr 2017 17:50:26 -0700 (PDT) From: David Matlack To: kvm@vger.kernel.org Cc: Peter Feiner , David Matlack Subject: [kvm-unit-tests PATCH 20/32] lib: fix *printf return value Date: Thu, 20 Apr 2017 17:49:52 -0700 Message-Id: <20170421005004.137260-21-dmatlack@google.com> X-Mailer: git-send-email 2.12.2.816.g2cccc81164-goog In-Reply-To: <20170421005004.137260-1-dmatlack@google.com> References: <20170421005004.137260-1-dmatlack@google.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Peter Feiner Was returning the number of characters printed plus, incorrectly, one for the null terminator. Signed-off-by: Peter Feiner Signed-off-by: David Matlack Reviewed-by: Andrew Jones --- lib/printf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/printf.c b/lib/printf.c index cecbeadc4440..aca2920887c1 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -221,7 +221,6 @@ int vsnprintf(char *buf, int size, const char *fmt, va_list va) } } *s.buffer = 0; - ++s.added; return s.added; }