1 --- busybox-1.00/networking/udhcp/common.c~udhcppidfile2
2 +++ busybox-1.00/networking/udhcp/common.c
7 - if (pidfile_reassign(pidfile, pid) < 0) {
8 + if (pidfile != NULL && pidfile_reassign(pidfile, pid) < 0) {
9 (void)kill(pid, SIGKILL);
15 /* do some other misc startup stuff while we are here to save bytes */
16 - if (pidfile_acquire(pidfile) < 0)
17 + if (pidfile != NULL && pidfile_acquire(pidfile) < 0)
20 /* equivelent of doing a fflush after every \n */
24 /* do some other misc startup stuff while we are here to save bytes */
25 - if (pidfile_acquire(pidfile) < 0)
26 + if (pidfile != NULL && pidfile_acquire(pidfile) < 0)
29 /* equivelent of doing a fflush after every \n */
30 --- busybox-1.00/networking/udhcp/pidfile.c~udhcppidfile2
31 +++ busybox-1.00/networking/udhcp/pidfile.c
33 int pidfile_acquire(const char *pidfile)
36 - if (!pidfile) return (-1);
38 + if (pidfile == NULL) {
39 + LOG(LOG_ERR, "pidfile_acquire: filename is NULL\n");
43 if ((fd = pidfile_open(pidfile)) < 0)
46 int pidfile_reassign(const char *pidfile, int pid)
49 - if (!pidfile) return (-1);
51 + if (pidfile == NULL) {
52 + LOG(LOG_ERR, "pidfile_reassign: filename is NULL\n");
56 if ((fd = pidfile_open(pidfile)) < 0)