correct arguments to some snprintf:s

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9052 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2000-09-12 11:38:14 +00:00
parent df474c713e
commit c94ec5d31e

View File

@@ -115,12 +115,12 @@ void *dlopen(const char *path, int mode)
} }
if ((mp = (ModulePtr)calloc(1, sizeof(*mp))) == NULL) { if ((mp = (ModulePtr)calloc(1, sizeof(*mp))) == NULL) {
errvalid++; errvalid++;
snprintf (errbuf, "calloc: %s", strerror(errno)); snprintf (errbuf, sizeof(errbuf), "calloc: %s", strerror(errno));
return NULL; return NULL;
} }
if ((mp->name = strdup(path)) == NULL) { if ((mp->name = strdup(path)) == NULL) {
errvalid++; errvalid++;
snprintf (errbuf, "strdup: %s", strerror(errno)); snprintf (errbuf, sizeof(errbuf), "strdup: %s", strerror(errno));
free(mp); free(mp);
return NULL; return NULL;
} }