mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-13 14:18:48 -04:00
Braces were missing when isc__strerror was added
This commit is contained in:
parent
d67b892041
commit
7869e8ad05
1 changed files with 7 additions and 4 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: os.c,v 1.11 2001/11/21 05:07:23 mayer Exp $ */
|
||||
/* $Id: os.c,v 1.12 2001/11/22 03:11:01 mayer Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdarg.h>
|
||||
|
|
@ -177,23 +177,26 @@ ns_os_writepidfile(const char *filename) {
|
|||
return;
|
||||
len = strlen(filename);
|
||||
pidfile = malloc(len + 1);
|
||||
if (pidfile == NULL)
|
||||
if (pidfile == NULL) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("couldn't malloc '%s': %s",
|
||||
filename, strbuf);
|
||||
}
|
||||
/* This is safe. */
|
||||
strcpy(pidfile, filename);
|
||||
|
||||
fd = safe_open(filename, ISC_FALSE);
|
||||
if (fd < 0)
|
||||
if (fd < 0) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("couldn't open pid file '%s': %s",
|
||||
filename, strbuf);
|
||||
}
|
||||
lockfile = fdopen(fd, "w");
|
||||
if (lockfile == NULL)
|
||||
if (lockfile == NULL) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("could not fdopen() pid file '%s': %s",
|
||||
filename, strbuf);
|
||||
}
|
||||
|
||||
pid = getpid();
|
||||
if (fprintf(lockfile, "%ld\n", (long)pid) < 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue