Skip to content

Commit

Permalink
msg: make vmsg and vfmsg declarations match implementation
Browse files Browse the repository at this point in the history
The 'suf' parameter was a late addition to the msg implementation.
I forgot to add it to the declarations in the header file.

Include msg.h in msg.c so the compiler will flag any future
mismatches.
  • Loading branch information
ChrisJohnsen committed Mar 25, 2011
1 parent d39b01a commit a40ffca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions msg.c
Expand Up @@ -4,6 +4,8 @@
#include <stdlib.h> /* malloc, exit, free */
#include <sys/errno.h> /* errno */

#include "msg.h"

void vfmsg(FILE *f,
const char *pre, const char *fmt, const char *suf,
va_list ap) {
Expand Down
6 changes: 4 additions & 2 deletions msg.h
@@ -1,9 +1,11 @@
#include <stdarg.h>
#include <stdio.h>

void vfmsg(FILE *f, const char *pre, const char *fmt, va_list ap);
void vfmsg(FILE *f,
const char *pre, const char *fmt, const char *suf,
va_list ap);
extern FILE *msgout;
void vmsg(const char *pre, const char *fmt, va_list ap);
void vmsg(const char *pre, const char *fmt, const char *suf, va_list ap);
void msg(const char *fmt, ...);
void warn(const char *fmt, ...);
void die(int ev, const char *fmt, ...);
Expand Down

0 comments on commit a40ffca

Please sign in to comment.