[BusyBox-cvs] busybox/networking/udhcp common.c,1.7,1.8

Russ Dill,,, russ at busybox.net
Wed May 19 07:46:25 UTC 2004


Update of /var/cvs/busybox/networking/udhcp
In directory nail:/tmp/cvs-serv27242

Modified Files:
	common.c 
Log Message:
remove uneccessary check (already done in pidfile.c)

Index: common.c
===================================================================
RCS file: /var/cvs/busybox/networking/udhcp/common.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- a/common.c	14 Apr 2004 17:51:25 -0000	1.7
+++ b/common.c	19 May 2004 07:46:23 -0000	1.8
@@ -60,13 +60,13 @@
 	int pid_fd;
 
 	/* hold lock during fork. */
-	if (pidfile) pid_fd = pidfile_acquire(pidfile);
+	pid_fd = pidfile_acquire(pidfile);
 	if (daemon(0, 0) == -1) {
 		perror("fork");
 		exit(1);
 	}
 	daemonized++;
-	if (pidfile) pidfile_write_release(pid_fd);
+	pidfile_write_release(pid_fd);
 #endif /* __uClinux__ */
 }
 
@@ -96,10 +96,8 @@
 	sanitize_fds();
 
 	/* do some other misc startup stuff while we are here to save bytes */
-	if (pidfile) {
-		pid_fd = pidfile_acquire(pidfile);
-		pidfile_write_release(pid_fd);
-	}
+	pid_fd = pidfile_acquire(pidfile);
+	pidfile_write_release(pid_fd);
 
 	/* equivelent of doing a fflush after every \n */
 	setlinebuf(stdout);




More information about the busybox-cvs mailing list