From owner-svn-src-all@FreeBSD.ORG Fri Jun 13 08:26:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DABD3EB; Fri, 13 Jun 2014 08:26:54 +0000 (UTC) Received: from svn.freebsd.org (svn.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 ED4F22F74; Fri, 13 Jun 2014 08:26:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5D8Qr0a071161; Fri, 13 Jun 2014 08:26:53 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5D8Qr0V071160; Fri, 13 Jun 2014 08:26:53 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201406130826.s5D8Qr0V071160@svn.freebsd.org> From: Tijl Coosemans Date: Fri, 13 Jun 2014 08:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267436 - head/lib/libiconv_modules/HZ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 08:26:54 -0000 Author: tijl Date: Fri Jun 13 08:26:53 2014 New Revision: 267436 URL: http://svnweb.freebsd.org/changeset/base/267436 Log: Replace malloc+memset with calloc. Modified: head/lib/libiconv_modules/HZ/citrus_hz.c Modified: head/lib/libiconv_modules/HZ/citrus_hz.c ============================================================================== --- head/lib/libiconv_modules/HZ/citrus_hz.c Fri Jun 13 07:33:43 2014 (r267435) +++ head/lib/libiconv_modules/HZ/citrus_hz.c Fri Jun 13 08:26:53 2014 (r267436) @@ -532,10 +532,9 @@ _citrus_HZ_parse_graphic(void *context, p = (void **)context; escape = (escape_t *)p[0]; ei = (_HZEncodingInfo *)p[1]; - graphic = malloc(sizeof(*graphic)); + graphic = calloc(1, sizeof(*graphic)); if (graphic == NULL) return (ENOMEM); - memset(graphic, 0, sizeof(*graphic)); if (strcmp("GL", name) == 0) { if (GL(escape) != NULL) goto release; @@ -598,10 +597,9 @@ _citrus_HZ_parse_escape(void *context, c void *p[2]; ei = (_HZEncodingInfo *)context; - escape = malloc(sizeof(*escape)); + escape = calloc(1, sizeof(*escape)); if (escape == NULL) return (EINVAL); - memset(escape, 0, sizeof(*escape)); if (strcmp("0", name) == 0) { escape->set = E0SET(ei); TAILQ_INSERT_TAIL(E0SET(ei), escape, entry);