summaryrefslogtreecommitdiff
path: root/usr.bin/ftp/stringlist.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-12 00:26:25 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-07-12 00:26:25 +0000
commit142cea7efbf90f7346eea931c9169fc82d3afa00 (patch)
tree98526be7cb2652f81eff13482e7ebcbf0156953c /usr.bin/ftp/stringlist.c
parent0ceb5fe1ba873660807cb0c7fe85b746baff2bc1 (diff)
malloc/strdup failure not handled; cloder@acm.org
Diffstat (limited to 'usr.bin/ftp/stringlist.c')
-rw-r--r--usr.bin/ftp/stringlist.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ftp/stringlist.c b/usr.bin/ftp/stringlist.c
index 9abfc540ad5..63320e7590a 100644
--- a/usr.bin/ftp/stringlist.c
+++ b/usr.bin/ftp/stringlist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stringlist.c,v 1.2 1997/07/25 21:56:23 millert Exp $ */
+/* $OpenBSD: stringlist.c,v 1.3 2002/07/12 00:25:30 deraadt Exp $ */
/* $NetBSD: stringlist.c,v 1.2 1997/01/17 07:26:20 lukem Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: stringlist.c,v 1.2 1997/07/25 21:56:23 millert Exp $";
+static char *rcsid = "$OpenBSD: stringlist.c,v 1.3 2002/07/12 00:25:30 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <stdio.h>
@@ -53,13 +53,13 @@ sl_init()
{
StringList *sl = malloc(sizeof(StringList));
if (sl == NULL)
- err(1, "stringlist: %m");
+ err(1, "stringlist");
sl->sl_cur = 0;
sl->sl_max = _SL_CHUNKSIZE;
sl->sl_str = malloc(sl->sl_max * sizeof(char *));
if (sl->sl_str == NULL)
- err(1, "stringlist: %m");
+ err(1, "stringlist");
return sl;
}
@@ -76,7 +76,7 @@ sl_add(sl, name)
sl->sl_max += _SL_CHUNKSIZE;
sl->sl_str = realloc(sl->sl_str, sl->sl_max * sizeof(char *));
if (sl->sl_str == NULL)
- err(1, "stringlist: %m");
+ err(1, "stringlist");
}
sl->sl_str[sl->sl_cur++] = name;
}