mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 13:57:50 +00:00
Merging in final change from rt15937, getting rid of space
before () in function calls.
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char ocopyright[] =
|
static char ocopyright[] =
|
||||||
"$Id: dhclient.c,v 1.136 2006/05/05 20:32:30 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
"$Id: dhclient.c,v 1.137 2006/05/11 14:48:58 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -106,15 +106,15 @@ int main (argc, argv, envp)
|
|||||||
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
||||||
2 (stderr) are open. To do this, we assume that when we
|
2 (stderr) are open. To do this, we assume that when we
|
||||||
open a file the lowest available file decriptor is used. */
|
open a file the lowest available file decriptor is used. */
|
||||||
fd = open ("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
if (fd == 0)
|
if (fd == 0)
|
||||||
fd = open ("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
if (fd == 1)
|
if (fd == 1)
|
||||||
fd = open ("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
if (fd == 2)
|
if (fd == 2)
|
||||||
log_perror = 0; /* No sense logging to /dev/null. */
|
log_perror = 0; /* No sense logging to /dev/null. */
|
||||||
else if (fd != -1)
|
else if (fd != -1)
|
||||||
close (fd);
|
close(fd);
|
||||||
|
|
||||||
#ifdef SYSLOG_4_2
|
#ifdef SYSLOG_4_2
|
||||||
openlog ("dhclient", LOG_NDELAY);
|
openlog ("dhclient", LOG_NDELAY);
|
||||||
@@ -2731,9 +2731,9 @@ void go_daemon ()
|
|||||||
close(2);
|
close(2);
|
||||||
|
|
||||||
/* Reopen them on /dev/null. */
|
/* Reopen them on /dev/null. */
|
||||||
open ("/dev/null", O_RDWR);
|
open("/dev/null", O_RDWR);
|
||||||
open ("/dev/null", O_RDWR);
|
open("/dev/null", O_RDWR);
|
||||||
open ("/dev/null", O_RDWR);
|
open("/dev/null", O_RDWR);
|
||||||
log_perror = 0; /* No sense logging to /dev/null. */
|
log_perror = 0; /* No sense logging to /dev/null. */
|
||||||
|
|
||||||
write_client_pid_file ();
|
write_client_pid_file ();
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char ocopyright[] =
|
static char ocopyright[] =
|
||||||
"$Id: dhcrelay.c,v 1.57 2006/05/05 20:32:30 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
"$Id: dhcrelay.c,v 1.58 2006/05/11 14:48:59 shane Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -114,15 +114,15 @@ int main (argc, argv, envp)
|
|||||||
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
||||||
2 (stderr) are open. To do this, we assume that when we
|
2 (stderr) are open. To do this, we assume that when we
|
||||||
open a file the lowest available file decriptor is used. */
|
open a file the lowest available file decriptor is used. */
|
||||||
fd = open ("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
if (fd == 0)
|
if (fd == 0)
|
||||||
fd = open ("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
if (fd == 1)
|
if (fd == 1)
|
||||||
fd = open ("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
if (fd == 2)
|
if (fd == 2)
|
||||||
log_perror = 0; /* No sense logging to /dev/null. */
|
log_perror = 0; /* No sense logging to /dev/null. */
|
||||||
else if (fd != -1)
|
else if (fd != -1)
|
||||||
close (fd);
|
close(fd);
|
||||||
|
|
||||||
#ifdef SYSLOG_4_2
|
#ifdef SYSLOG_4_2
|
||||||
openlog ("dhcrelay", LOG_NDELAY);
|
openlog ("dhcrelay", LOG_NDELAY);
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char ocopyright[] =
|
static char ocopyright[] =
|
||||||
"$Id: dhcpd.c,v 1.119 2006/05/05 20:32:30 dhankins Exp $ Copyright 2004-2006 Internet Systems Consortium.";
|
"$Id: dhcpd.c,v 1.120 2006/05/11 14:48:59 shane Exp $ Copyright 2004-2006 Internet Systems Consortium.";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
@@ -230,15 +230,15 @@ int main (argc, argv, envp)
|
|||||||
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
||||||
2 (stderr) are open. To do this, we assume that when we
|
2 (stderr) are open. To do this, we assume that when we
|
||||||
open a file the lowest available file decriptor is used. */
|
open a file the lowest available file decriptor is used. */
|
||||||
fd = open ("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
if (fd == 0)
|
if (fd == 0)
|
||||||
fd = open ("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
if (fd == 1)
|
if (fd == 1)
|
||||||
fd = open ("/dev/null", O_RDWR);
|
fd = open("/dev/null", O_RDWR);
|
||||||
if (fd == 2)
|
if (fd == 2)
|
||||||
log_perror = 0; /* No sense logging to /dev/null. */
|
log_perror = 0; /* No sense logging to /dev/null. */
|
||||||
else if (fd != -1)
|
else if (fd != -1)
|
||||||
close (fd);
|
close(fd);
|
||||||
|
|
||||||
/* Set up the client classification system. */
|
/* Set up the client classification system. */
|
||||||
classification_setup ();
|
classification_setup ();
|
||||||
@@ -573,17 +573,17 @@ int main (argc, argv, envp)
|
|||||||
|
|
||||||
if (daemon) {
|
if (daemon) {
|
||||||
/* Become session leader and get pid... */
|
/* Become session leader and get pid... */
|
||||||
pid = setsid ();
|
pid = setsid();
|
||||||
|
|
||||||
/* Close standard I/O descriptors. */
|
/* Close standard I/O descriptors. */
|
||||||
close (0);
|
close(0);
|
||||||
close (1);
|
close(1);
|
||||||
close (2);
|
close(2);
|
||||||
|
|
||||||
/* Reopen them on /dev/null. */
|
/* Reopen them on /dev/null. */
|
||||||
open ("/dev/null", O_RDWR);
|
open("/dev/null", O_RDWR);
|
||||||
open ("/dev/null", O_RDWR);
|
open("/dev/null", O_RDWR);
|
||||||
open ("/dev/null", O_RDWR);
|
open("/dev/null", O_RDWR);
|
||||||
log_perror = 0; /* No sense logging to /dev/null. */
|
log_perror = 0; /* No sense logging to /dev/null. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user