lintian doesn't like orphan packages with uploaders...
[debian/amanda] / common-src / packet.c
index 87b5f5043448ec956dd55cb0cc4340c7420cf975..bbeb7816fccc45b190336b49f107b02a0681b955 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Amanda, The Advanced Maryland Automatic Network Disk Archiver
  * Copyright (c) 1991-1999 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc.  All Rights Reserved.
  * All Rights Reserved.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -72,14 +73,15 @@ printf_arglist_function2(void pkt_init, pkt_t *, pkt, pktype_t, type,
 
     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);
-       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;
@@ -107,7 +109,7 @@ printf_arglist_function1(void pkt_cat, pkt_t *, pkt, const char *, 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;