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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user