~ubuntu-branches/ubuntu/raring/bind9/raring

« back to all changes in this revision

Viewing changes to lib/dns/rdata.c

  • Committer: Package Import Robot
  • Author(s): LaMont Jones
  • Date: 2012-01-19 12:30:31 UTC
  • mfrom: (1.9.1) (26.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20120119123031-0j2wlg66ll5ogpz2
Tags: 1:9.8.1.dfsg.P1-1~build1
preciseĀ upload

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004-2009, 2011  Internet Systems Consortium, Inc. ("ISC")
 
2
 * Copyright (C) 2004-2011  Internet Systems Consortium, Inc. ("ISC")
3
3
 * Copyright (C) 1998-2003  Internet Software Consortium.
4
4
 *
5
5
 * Permission to use, copy, modify, and/or distribute this software for any
15
15
 * PERFORMANCE OF THIS SOFTWARE.
16
16
 */
17
17
 
18
 
/* $Id: rdata.c,v 1.204.4.2 2011-01-13 04:48:57 tbox Exp $ */
 
18
/* $Id: rdata.c,v 1.209.8.2 2011-03-11 06:47:05 marka Exp $ */
19
19
 
20
20
/*! \file */
21
21
 
708
708
        if (use_default) {
709
709
                strlcpy(buf, "\\# ", sizeof(buf));
710
710
                result = str_totext(buf, target);
 
711
                INSIST(result == ISC_R_SUCCESS);
711
712
                dns_rdata_toregion(rdata, &sr);
712
713
                INSIST(sr.length < 65536);
713
714
                snprintf(buf, sizeof(buf), "%u", sr.length);
963
964
        isc_result_t result;
964
965
        isc_buffer_t buf;
965
966
 
 
967
        if (size == 0U)
 
968
                return;
 
969
 
966
970
        isc_buffer_init(&buf, array, size);
967
971
        result = dns_rdatatype_totext(rdtype, &buf);
968
972
        /*
974
978
                else
975
979
                        result = ISC_R_NOSPACE;
976
980
        }
977
 
        if (result != ISC_R_SUCCESS) {
978
 
                snprintf(array, size, "<unknown>");
979
 
                array[size - 1] = '\0';
980
 
        }
 
981
        if (result != ISC_R_SUCCESS)
 
982
                strlcpy(array, "<unknown>", size);
981
983
}
982
984
 
983
985
/*