-/* $OpenBSD: net_ctl.c,v 1.10 2015/08/20 22:39:29 deraadt Exp $ */
+/* $OpenBSD: net_ctl.c,v 1.11 2016/07/18 21:22:09 benno Exp $ */
/*
* Copyright (c) 2005 Håkan Olsson. All rights reserved.
struct ctlmsg *m = malloc(sizeof *m);
if (!m) {
- log_err("malloc(%u)", sizeof *m);
+ log_err("malloc(%zu)", sizeof *m);
return -1;
}
-/* $OpenBSD: pfkey.c,v 1.25 2015/10/18 02:39:04 mmcc Exp $ */
+/* $OpenBSD: pfkey.c,v 1.26 2016/07/18 21:22:09 benno Exp $ */
/*
* Copyright (c) 2005 Håkan Olsson. All rights reserved.
sadb->sadb_msg_pid = getpid();
sadb->sadb_msg_seq = seq++;
- log_msg(2, "pfkey_queue_message: pfkey %s len %u seq %u",
+ log_msg(2, "pfkey_queue_message: pfkey %s len %zu seq %u",
pfkey_print_type(sadb), sadb->sadb_msg_len * CHUNK,
sadb->sadb_msg_seq);
memcpy(sendbuf, m, m->sadb_msg_len * CHUNK);
net_queue(p, MSG_PFKEYDATA, sendbuf,
m->sadb_msg_len * CHUNK);
- log_msg(2, "pfkey_snapshot: sync SA %p len %u "
+ log_msg(2, "pfkey_snapshot: sync SA %p len %zu "
"to peer %s", m,
m->sadb_msg_len * CHUNK, p->name);
}
net_queue(p, MSG_PFKEYDATA, sendbuf,
m->sadb_msg_len * CHUNK);
log_msg(2, "pfkey_snapshot: sync FLOW %p len "
- "%u to peer %s", m,
+ "%zu to peer %s", m,
m->sadb_msg_len * CHUNK, p->name);
}
}
-/* $OpenBSD: sasyncd.h,v 1.17 2012/09/15 00:46:43 guenther Exp $ */
+/* $OpenBSD: sasyncd.h,v 1.18 2016/07/18 21:22:09 benno Exp $ */
/*
* Copyright (c) 2005 Håkan Olsson. All rights reserved.
* 6 = timers
*/
void log_init(char *);
-void log_msg(int, const char *, ...);
-void log_err(const char *, ...);
+void log_msg(int, const char *, ...)
+ __attribute__((__format__ (printf, 2, 3)));
+void log_err(const char *, ...)
+ __attribute__((__format__ (printf, 1, 2)));
/* monitor.c */
pid_t monitor_init(void);