Commit e10c916e6a794631e8c4a0a73aeb1b3615863e70

Hiltjo Posthuma 2019-09-15T13:53:41

change "calloc" to "strdup" for strdup() NULL return value

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/tog/tog.c b/tog/tog.c
index 28f1f7a..4176e44 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -4688,11 +4688,11 @@ make_argv(const char *arg0, const char *arg1)
 		err(1, "calloc");
 	argv[0] = strdup(arg0);
 	if (argv[0] == NULL)
-		err(1, "calloc");
+		err(1, "strdup");
 	if (arg1) {
 		argv[1] = strdup(arg1);
 		if (argv[1] == NULL)
-			err(1, "calloc");
+			err(1, "strdup");
 	}
 
 	return argv;