]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: use xcalloc rather than xmalloc+memset (no semantic change)
authorJim Meyering <meyering@redhat.com>
Thu, 4 Aug 2011 16:46:16 +0000 (18:46 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 8 Aug 2011 08:12:38 +0000 (10:12 +0200)
* src/join.c (init_linep): Use xcalloc, not xmalloc+memset.

src/join.c

index 941185c8a132becfbb9980b7329299c57ba2e8c1..99d918fd1a6a30a830e84454a0369e4f3b80f619 100644 (file)
@@ -405,8 +405,7 @@ reset_line (struct line *line)
 static struct line *
 init_linep (struct line **linep)
 {
-  struct line *line = xmalloc (sizeof *line);
-  memset (line, '\0', sizeof *line);
+  struct line *line = xcalloc (1, sizeof *line);
   *linep = line;
   return line;
 }