projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 2.6.0
[debian/amanda]
/
common-src
/
packet.c
diff --git
a/common-src/packet.c
b/common-src/packet.c
index 87b5f5043448ec956dd55cb0cc4340c7420cf975..c161f95c9f3a7c1019d555e6a6590138815f3684 100644
(file)
--- a/
common-src/packet.c
+++ b/
common-src/packet.c
@@
-72,14
+72,15
@@
printf_arglist_function2(void pkt_init, pkt_t *, pkt, pktype_t, type,
assert(pkt != NULL);
assert(strcmp(pkt_type2str(type), "BOGUS") != 0);
assert(pkt != NULL);
assert(strcmp(pkt_type2str(type), "BOGUS") != 0);
- assert(fmt != NULL);
+ if(fmt == NULL)
+ fmt = "";
pkt->type = type;
pkt->packet_size = 1000;
pkt->body = alloc(pkt->packet_size);
while(1) {
arglist_start(argp, fmt);
pkt->type = type;
pkt->packet_size = 1000;
pkt->body = alloc(pkt->packet_size);
while(1) {
arglist_start(argp, fmt);
- len = vsnprintf(pkt->body, pkt->packet_size, fmt, argp);
+ len =
g_
vsnprintf(pkt->body, pkt->packet_size, fmt, argp);
arglist_end(argp);
if (len > -1 && len < (int)(pkt->packet_size - 1))
break;
arglist_end(argp);
if (len > -1 && len < (int)(pkt->packet_size - 1))
break;
@@
-107,7
+108,7
@@
printf_arglist_function1(void pkt_cat, pkt_t *, pkt, const char *, fmt)
while(1) {
arglist_start(argp, fmt);
while(1) {
arglist_start(argp, fmt);
- lenX = vsnprintf(pkt->body + len, pkt->packet_size - len, fmt,argp);
+ lenX =
g_
vsnprintf(pkt->body + len, pkt->packet_size - len, fmt,argp);
arglist_end(argp);
if (lenX > -1 && lenX < (int)(pkt->packet_size - len - 1))
break;
arglist_end(argp);
if (lenX > -1 && lenX < (int)(pkt->packet_size - len - 1))
break;