Fix bogus initialization of using a sledge hammer to quite -Wall, bad
indention, and size issue between 32 and 64bit machines. Submitted by: bde
This commit is contained in:
parent
1b900f573c
commit
7c815b0db8
@ -343,8 +343,6 @@ save_core()
|
||||
char *rawp, path[MAXPATHLEN];
|
||||
mode_t oumask;
|
||||
|
||||
bounds = ifd = nr = nw = ofd = 0;
|
||||
|
||||
/*
|
||||
* Get the current number and update the bounds file. Do the update
|
||||
* now, because may fail later and don't want to overwrite anything.
|
||||
@ -376,6 +374,7 @@ err1: syslog(LOG_WARNING, "%s: %s", path, strerror(errno));
|
||||
syslog(LOG_ERR, "%s: %s", path, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
ofd = -1; /* Not actually used. */
|
||||
} else
|
||||
ofd = Create(path, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
(void)umask(oumask);
|
||||
@ -511,7 +510,7 @@ rawname(s)
|
||||
"can't make raw dump device name from %s", s);
|
||||
return (s);
|
||||
}
|
||||
(void)snprintf(name, sizeof(name), "%.*s/r%s", (int)(sl - s), s, sl + 1);
|
||||
snprintf(name, sizeof(name), "%.*s/r%s", (int)(sl - s), s, sl + 1);
|
||||
if ((sl = strdup(name)) == NULL) {
|
||||
syslog(LOG_ERR, "%s", strerror(errno));
|
||||
exit(1);
|
||||
@ -587,8 +586,8 @@ check_space()
|
||||
needed = (dumpsize + kernelsize) / 1024;
|
||||
if (((minfree > 0) ? spacefree : totfree) - needed < minfree) {
|
||||
syslog(LOG_WARNING,
|
||||
"no dump, not enough free space on device (%ld available, need %ld",
|
||||
(minfree > 0) ? spacefree : totfree, needed);
|
||||
"no dump, not enough free space on device (%lld available, need %lld)",
|
||||
(long long)(minfree > 0 ? spacefree : totfree), (long long)needed);
|
||||
return (0);
|
||||
}
|
||||
if (spacefree - needed < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user