diff options
author | dhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-08-24 19:13:15 +0000 |
---|---|---|
committer | dhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-08-24 19:13:15 +0000 |
commit | e52e5f8e343c03ddf9ee67a8559f5203a0f22356 (patch) | |
tree | e403c1364507d63685d72b22654a033420b89f38 /ASNMP/asnmp/vb.cpp | |
parent | 6b82e03ef4fcc60e5ab57bd9fac65dc001323cf8 (diff) | |
download | ATCD-e52e5f8e343c03ddf9ee67a8559f5203a0f22356.tar.gz |
ChangeLogTag:Sun Aug 24 19:04:23 UTC 2003 Don Hinton <dhinton@dresystems.com>
Diffstat (limited to 'ASNMP/asnmp/vb.cpp')
-rw-r--r-- | ASNMP/asnmp/vb.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ASNMP/asnmp/vb.cpp b/ASNMP/asnmp/vb.cpp index ff9c22bb773..ab32e9639bb 100644 --- a/ASNMP/asnmp/vb.cpp +++ b/ASNMP/asnmp/vb.cpp @@ -346,7 +346,7 @@ SmiUINT32 Vb::get_syntax() } // return the printabel value -char *Vb::to_string_value() +const char *Vb::to_string_value() { if (iv_vb_value_) return iv_vb_value_->to_string(); @@ -355,18 +355,16 @@ char *Vb::to_string_value() } // return the printable oid -char *Vb::to_string_oid() +const char *Vb::to_string_oid() { return iv_vb_oid_.to_string(); } // generate string with name/ value format -char *Vb::to_string() +const char *Vb::to_string() { int len = ACE_OS::strlen(iv_vb_oid_.to_string()); - char *ptr = ""; - if (iv_vb_value_) - ptr = iv_vb_value_->to_string(); + const char *ptr = iv_vb_value_ ? iv_vb_value_->to_string() : ""; len += ACE_OS::strlen(ptr) + 3 + 1; // " / " + null ACE_NEW_RETURN(output_, char[len], ""); ACE_OS::sprintf(output_, "%s / %s", iv_vb_oid_.to_string(), ptr); |