[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] maint: use xcalloc rather than xmalloc+memset (no semantic chang
From: |
Jim Meyering |
Subject: |
[PATCH] maint: use xcalloc rather than xmalloc+memset (no semantic change) |
Date: |
Mon, 08 Aug 2011 10:15:40 +0200 |
FYI,
>From 005534907cdc7ff0a4c7908631ff596c4b07ba56 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Thu, 4 Aug 2011 18:46:16 +0200
Subject: [PATCH] maint: use xcalloc rather than xmalloc+memset (no
semantic change)
* src/join.c (init_linep): Use xcalloc, not xmalloc+memset.
---
src/join.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/join.c b/src/join.c
index 941185c..99d918f 100644
--- a/src/join.c
+++ b/src/join.c
@@ -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;
}
--
1.7.6.351.gb35ac
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] maint: use xcalloc rather than xmalloc+memset (no semantic change),
Jim Meyering <=