From owner-svn-src-head@freebsd.org Sat Sep 5 19:28:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BABE9CA03C; Sat, 5 Sep 2015 19:28:42 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D223A21; Sat, 5 Sep 2015 19:28:42 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t85JSgSa013362; Sat, 5 Sep 2015 19:28:42 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t85JSgQw013361; Sat, 5 Sep 2015 19:28:42 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201509051928.t85JSgQw013361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sat, 5 Sep 2015 19:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287491 - head/usr.bin/procstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2015 19:28:42 -0000 Author: allanjude Date: Sat Sep 5 19:28:41 2015 New Revision: 287491 URL: https://svnweb.freebsd.org/changeset/base/287491 Log: Fix build error on gcc platforms Approved by: bapt (mentor) Modified: head/usr.bin/procstat/procstat_kstack.c Modified: head/usr.bin/procstat/procstat_kstack.c ============================================================================== --- head/usr.bin/procstat/procstat_kstack.c Sat Sep 5 18:36:23 2015 (r287490) +++ head/usr.bin/procstat/procstat_kstack.c Sat Sep 5 19:28:41 2015 (r287491) @@ -131,6 +131,7 @@ kstack_cleanup_encoded(const char *old, cp_new++; } } + *cp_new = '\0'; cp_tofree = cp_loop = strdup(new); } else cp_tofree = cp_loop = strdup(old); @@ -138,7 +139,6 @@ kstack_cleanup_encoded(const char *old, if (strlen(cp_line) != 0 && *cp_line != 127) xo_emit("{le:token/%s}", cp_line); } - *cp_new = '\0'; free(cp_tofree); }