Fix from dgibson@linuxcare.com.
**************************************************************************/
-static bool reopen_one_log(int *fd, const char *logfile)
+static bool reopen_one_log(struct debug_class *config)
{
- int old_fd = *fd;
+ int old_fd = config->fd;
+ const char *logfile = config->logfile;
int new_fd;
if (logfile == NULL) {
debug_close_fd(old_fd);
- *fd = -1;
+ config->fd = -1;
return true;
}
debug_close_fd(old_fd);
smb_set_close_on_exec(new_fd);
- *fd = new_fd;
+ config->fd = new_fd;
return true;
}
state.reopening_logs = true;
for (i = DBGC_ALL; i < debug_num_classes; i++) {
- ok = reopen_one_log(&dbgc_config[i].fd,
- dbgc_config[i].logfile);
+ ok = reopen_one_log(&dbgc_config[i]);
if (!ok) {
break;
}