summaryrefslogtreecommitdiffstats
path: root/libexec/talkd
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-03-10 04:32:45 +0000
committerderaadt <deraadt@openbsd.org>2004-03-10 04:32:45 +0000
commitc9d21d97203d5ba2aa648dd525f94e7d9bb31aa0 (patch)
treecf4dc00285007ddd50017622e778525fedbca3f3 /libexec/talkd
parentclose file on error paths. from Patrick Latifi (diff)
downloadwireguard-openbsd-c9d21d97203d5ba2aa648dd525f94e7d9bb31aa0.tar.xz
wireguard-openbsd-c9d21d97203d5ba2aa648dd525f94e7d9bb31aa0.zip
spaces
Diffstat (limited to 'libexec/talkd')
-rw-r--r--libexec/talkd/announce.c8
-rw-r--r--libexec/talkd/print.c17
-rw-r--r--libexec/talkd/process.c6
-rw-r--r--libexec/talkd/table.c10
4 files changed, 22 insertions, 19 deletions
diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c
index afb8124a6ee..e2347dc7045 100644
--- a/libexec/talkd/announce.c
+++ b/libexec/talkd/announce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: announce.c,v 1.19 2004/03/10 03:45:24 tedu Exp $ */
+/* $OpenBSD: announce.c,v 1.20 2004/03/10 04:32:45 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)announce.c 5.9 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: announce.c,v 1.19 2004/03/10 03:45:24 tedu Exp $";
+static char rcsid[] = "$Id: announce.c,v 1.20 2004/03/10 04:32:45 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -88,7 +88,7 @@ announce(CTL_MSG *request, char *remote_machine)
#define N_CHARS 120
/*
- * Build a block of characters containing the message.
+ * Build a block of characters containing the message.
* It is sent blank filled and in a single block to
* try to keep the message in one piece if the recipient
* is in vi at the time
@@ -115,7 +115,7 @@ print_mesg(FILE *tf, CTL_MSG *request, char *remote_machine)
sizes[i] = strlen(line_buf[i]);
max_size = max(max_size, sizes[i]);
i++;
- (void)snprintf(line_buf[i], N_CHARS,
+ (void)snprintf(line_buf[i], N_CHARS,
"Message from Talk_Daemon@%s at %d:%02d ...",
hostname, localclock->tm_hour , localclock->tm_min );
sizes[i] = strlen(line_buf[i]);
diff --git a/libexec/talkd/print.c b/libexec/talkd/print.c
index 463c0ff23bc..c37d50014a1 100644
--- a/libexec/talkd/print.c
+++ b/libexec/talkd/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.8 2003/07/29 18:39:23 deraadt Exp $ */
+/* $OpenBSD: print.c,v 1.9 2004/03/10 04:32:45 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)print.c 5.8 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: print.c,v 1.8 2003/07/29 18:39:23 deraadt Exp $";
+static char rcsid[] = "$Id: print.c,v 1.9 2004/03/10 04:32:45 deraadt Exp $";
#endif /* not lint */
/* debug print routines */
@@ -43,12 +43,15 @@ static char rcsid[] = "$Id: print.c,v 1.8 2003/07/29 18:39:23 deraadt Exp $";
#include <stdio.h>
#include "talkd.h"
-static char *types[] =
- { "leave_invite", "look_up", "delete", "announce" };
+static char *types[] = {
+ "leave_invite", "look_up", "delete", "announce"
+};
#define NTYPES (sizeof(types) / sizeof(types[0]))
-static char *answers[] =
- { "success", "not_here", "failed", "machine_unknown", "permission_denied",
- "unknown_request", "badversion", "badaddr", "badctladdr" };
+
+static char *answers[] = {
+ "success", "not_here", "failed", "machine_unknown", "permission_denied",
+ "unknown_request", "badversion", "badaddr", "badctladdr"
+};
#define NANSWERS (sizeof(answers) / sizeof(answers[0]))
void
diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c
index b7cd08ebeec..216a056f8f0 100644
--- a/libexec/talkd/process.c
+++ b/libexec/talkd/process.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: process.c,v 1.16 2003/06/11 14:24:46 deraadt Exp $ */
+/* $OpenBSD: process.c,v 1.17 2004/03/10 04:32:45 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -31,7 +31,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)process.c 5.10 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: process.c,v 1.16 2003/06/11 14:24:46 deraadt Exp $";
+static char rcsid[] = "$Id: process.c,v 1.17 2004/03/10 04:32:45 deraadt Exp $";
#endif /* not lint */
/*
@@ -101,7 +101,7 @@ process_request(CTL_MSG *mp, CTL_RESPONSE *rp)
strlcpy(buf2, inet_ntoa(satosin(&mp->ctl_addr)->sin_addr),
sizeof(buf2));
syslog(LOG_WARNING, "addresses are different, %s != %s",
- buf1, buf2);
+ buf1, buf2);
}
rp->addr.sa_family = 0;
mp->pid = ntohl(mp->pid);
diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c
index d80caa175dd..325029a4266 100644
--- a/libexec/talkd/table.c
+++ b/libexec/talkd/table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table.c,v 1.10 2003/06/11 14:24:46 deraadt Exp $ */
+/* $OpenBSD: table.c,v 1.11 2004/03/10 04:32:45 deraadt Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -31,13 +31,13 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)table.c 5.7 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: table.c,v 1.10 2003/06/11 14:24:46 deraadt Exp $";
+static char rcsid[] = "$Id: table.c,v 1.11 2004/03/10 04:32:45 deraadt Exp $";
#endif /* not lint */
/*
* Routines to handle insertion, deletion, etc on the table
* of requests kept by the daemon. Nothing fancy here, linear
- * search on a double-linked list. A time is kept with each
+ * search on a double-linked list. A time is kept with each
* entry so that overly old invitations can be eliminated.
*
* Consider this a mis-guided attempt at modularity
@@ -106,7 +106,7 @@ find_match(CTL_MSG *request)
print_request("", &ptr->request);
if (strcmp(request->l_name, ptr->request.r_name) == 0 &&
strcmp(request->r_name, ptr->request.l_name) == 0 &&
- ptr->request.type == LEAVE_INVITE)
+ ptr->request.type == LEAVE_INVITE)
return (&ptr->request);
}
if (debug)
@@ -117,7 +117,7 @@ find_match(CTL_MSG *request)
/*
* Look for an identical request, as opposed to a complimentary
- * one as find_match does
+ * one as find_match does
*/
CTL_MSG *
find_request(CTL_MSG *request)