/*
* Write PID file.
*/
- n = snprintf(buf, sizeof (buf), "%d\n", (int) getpid());
+ n = snprintf(buf, sizeof (buf), "%d\n", (int)getpid());
if ((n < 0) || (n >= sizeof (buf))) {
errno = ERANGE;
zed_log_msg(LOG_ERR, "Failed to write PID file \"%s\": %s",
"Failed to read state file: %s", strerror(errno));
return (-1);
}
- if (lseek(zcp->state_fd, 0, SEEK_SET) == (off_t) -1) {
+ if (lseek(zcp->state_fd, 0, SEEK_SET) == (off_t)-1) {
zed_log_msg(LOG_WARNING,
"Failed to reposition state file offset: %s",
strerror(errno));
"Failed to write state file: %s", strerror(errno));
return (-1);
}
- if (lseek(zcp->state_fd, 0, SEEK_SET) == (off_t) -1) {
+ if (lseek(zcp->state_fd, 0, SEEK_SET) == (off_t)-1) {
zed_log_msg(LOG_WARNING,
"Failed to reposition state file offset: %s",
strerror(errno));