summaryrefslogtreecommitdiff
path: root/lib/libfrr.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-11 16:55:56 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-09-11 16:55:56 +0200
commit371bfb5c3ef9aa852c7f143c4357f3a18a589fb5 (patch)
treed26d5ef2b2d48052068993b29e555653f880e591 /lib/libfrr.c
parent6e23e5e9e16fb16aafb4ef05ceb3514a02147a21 (diff)
lib: whitespace/spelling fix
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/libfrr.c')
-rw-r--r--lib/libfrr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libfrr.c b/lib/libfrr.c
index 115c70f7c9..61f5fa7081 100644
--- a/lib/libfrr.c
+++ b/lib/libfrr.c
@@ -266,8 +266,8 @@ static void frr_guard_daemon(void)
{
int fd;
struct flock lock;
-
const char *path = di->pid_file;
+
fd = open(path, O_RDWR);
if (fd != -1) {
memset(&lock, 0, sizeof(lock));
@@ -280,7 +280,7 @@ static void frr_guard_daemon(void)
exit(1);
} else if (lock.l_type == F_WRLCK) {
flog_err_sys(LIB_ERR_SYSTEM_CALL,
- "Process %d has a write lock on file %s already! Error : ( %s)",
+ "Process %d has a write lock on file %s already! Error: (%s)",
lock.l_pid, path, safe_strerror(errno));
exit(1);
}
@@ -294,7 +294,6 @@ void frr_preinit(struct frr_daemon_info *daemon, int argc, char **argv)
/* basename(), opencoded. */
char *p = strrchr(argv[0], '/');
-
di->progname = p ? p + 1 : argv[0];
umask(0027);