Skip to contentSkip to conversation

use xstrdup please

PATCH New Shawn O. Pearce 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use xstrdup please

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

---
 config.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
config.c +2 -2
index a3c7b77..d537311 100644
@@ -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;
 	}
 
Signature · 1 line
1.5.0.4.1009.gd3da