diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-03-04 00:57:29 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:35:08 -0700 |
commit | d00bd1724bd9f75f5a7b8e0368428c2f0d6d3c26 (patch) | |
tree | 746590554d4dda2ae4eddbfb59f6cb2eefe48cb0 /logging.h | |
parent | 56c963dc4d8a65a8f2f23ae329f2088fabbf3303 (diff) |
[PATCH] overall trivial trivial cleanup
Here I try to make the style a bit more consistant in the different
files, so that new patches just copy the 'right' one :)
Some "magic" numbers are replaced and udevtest.c is catched up with udev.
Diffstat (limited to 'logging.h')
-rw-r--r-- | logging.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -34,6 +34,8 @@ #include <unistd.h> #include <syslog.h> +#define LOGNAME_SIZE 42 + #undef info #define info(format, arg...) \ do { \ @@ -61,12 +63,12 @@ extern void log_message(int level, const char *format, ...) __attribute__ ((format (printf, 2, 3))); /* each program that uses syslog must declare this variable somewhere */ -extern unsigned char logname[42]; +extern unsigned char logname[LOGNAME_SIZE]; #undef init_logging static inline void init_logging(char *program_name) { - snprintf(logname, 42,"%s[%d]", program_name, getpid()); + snprintf(logname, LOGNAME_SIZE,"%s[%d]", program_name, getpid()); openlog(logname, 0, LOG_DAEMON); } |