All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] use xstrdup please
@ 2007-03-16  1:02 Shawn O. Pearce
  0 siblings, 0 replies; only message in thread
From: Shawn O. Pearce @ 2007-03-16  1:02 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

We generally prefer xstrdup to just plain strdup.
Make it so.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 config.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config.c b/config.c
index a3c7b77..d537311 100644
--- a/config.c
+++ b/config.c
@@ -351,12 +351,12 @@ int git_default_config(const char *var, const char *value)
 	}
 
 	if (!strcmp(var, "i18n.commitencoding")) {
-		git_commit_encoding = strdup(value);
+		git_commit_encoding = xstrdup(value);
 		return 0;
 	}
 
 	if (!strcmp(var, "i18n.logoutputencoding")) {
-		git_log_output_encoding = strdup(value);
+		git_log_output_encoding = xstrdup(value);
 		return 0;
 	}
 
-- 
1.5.0.4.1009.gd3da

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-16  1:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-16  1:02 [PATCH] use xstrdup please Shawn O. Pearce

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.