summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2013-12-21 06:29:17 +0000
committerguenther <guenther@openbsd.org>2013-12-21 06:29:17 +0000
commit11f1a30cc31bbc4e3617e6318a29c57aef5c1dee (patch)
tree25ef6b7c47a47e44491dc8761cfa1ec0d2ed9af8
parentMatch the type to the calls (diff)
downloadwireguard-openbsd-11f1a30cc31bbc4e3617e6318a29c57aef5c1dee.tar.xz
wireguard-openbsd-11f1a30cc31bbc4e3617e6318a29c57aef5c1dee.zip
Constipate some functions
-rw-r--r--usr.bin/rdist/defs.h10
-rw-r--r--usr.bin/rdist/message.c18
2 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/rdist/defs.h b/usr.bin/rdist/defs.h
index 687f61d2799..d3d62bfac8d 100644
--- a/usr.bin/rdist/defs.h
+++ b/usr.bin/rdist/defs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: defs.h,v 1.18 2012/11/12 01:14:41 guenther Exp $ */
+/* $OpenBSD: defs.h,v 1.19 2013/12/21 06:29:17 guenther Exp $ */
#ifndef __DEFS_H__
#define __DEFS_H__
@@ -449,10 +449,10 @@ void msgprusage(void);
void msgprconfig(void);
char *msgparseopts(char *, int);
void checkhostname(void);
-void message(int, char *, ...) __attribute__((__format__ (printf, 2, 3)));
-void debugmsg(int, char *, ...) __attribute__((__format__ (printf, 2, 3)));
-void error(char *, ...) __attribute__((__format__ (printf, 1, 2)));
-void fatalerr(char *, ...) __attribute__((__format__ (printf, 1, 2)));
+void message(int, const char *, ...) __attribute__((format (printf, 2, 3)));
+void debugmsg(int, const char *, ...) __attribute__((format (printf, 2, 3)));
+void error(const char *, ...) __attribute__((format (printf, 1, 2)));
+void fatalerr(const char *, ...) __attribute__((format (printf, 1, 2)));
char *getnotifyfile(void);
/* rdist.c */
diff --git a/usr.bin/rdist/message.c b/usr.bin/rdist/message.c
index a622f99b89d..da15ba81fcb 100644
--- a/usr.bin/rdist/message.c
+++ b/usr.bin/rdist/message.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: message.c,v 1.18 2009/10/27 23:59:42 deraadt Exp $ */
+/* $OpenBSD: message.c,v 1.19 2013/12/21 06:29:17 guenther Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -78,8 +78,8 @@ static MSGTYPE *getmsgtype(char *);
static char *setmsgtypes(MSGFACILITY *, char *);
static void _message(int, char *);
static void _debugmsg(int, char *);
-static void _error(char *);
-static void _fatalerr(char *);
+static void _error(const char *);
+static void _fatalerr(const char *);
/*
* Print message logging usage message
@@ -581,7 +581,7 @@ message(va_alist)
* Stdarg front-end to _message()
*/
void
-message(int lvl, char *fmt, ...)
+message(int lvl, const char *fmt, ...)
{
static char buf[MSGBUFSIZ];
va_list args;
@@ -633,7 +633,7 @@ debugmsg(va_alist)
* Stdarg front-end to _debugmsg()
*/
void
-debugmsg(int lvl, char *fmt, ...)
+debugmsg(int lvl, const char *fmt, ...)
{
static char buf[MSGBUFSIZ];
va_list args;
@@ -650,7 +650,7 @@ debugmsg(int lvl, char *fmt, ...)
* Print an error message
*/
static void
-_error(char *msg)
+_error(const char *msg)
{
static char buf[MSGBUFSIZ];
@@ -697,7 +697,7 @@ error(va_alist)
* Stdarg frontend to _error()
*/
void
-error(char *fmt, ...)
+error(const char *fmt, ...)
{
static char buf[MSGBUFSIZ];
va_list args;
@@ -716,7 +716,7 @@ error(char *fmt, ...)
* Display a fatal message
*/
static void
-_fatalerr(char *msg)
+_fatalerr(const char *msg)
{
static char buf[MSGBUFSIZ];
@@ -758,7 +758,7 @@ fatalerr(va_alist)
* Stdarg front-end to _fatalerr()
*/
void
-fatalerr(char *fmt, ...)
+fatalerr(const char *fmt, ...)
{
static char buf[MSGBUFSIZ];
va_list args;