"oid_to_str()" and "oid_to_str_buf()" don't modify what the "oid"
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 5 May 2005 09:40:24 +0000 (09:40 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 5 May 2005 09:40:24 +0000 (09:40 +0000)
argument points to, so make it a "const" pointer.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14311 f5534014-38df-0310-8fa8-9805f1628bb7

epan/to_str.c
epan/to_str.h

index 969e5c07b191a281ad4969a07461c5ce9303abeb..76bcd4eccd0db501f14e78df550b6d8ec4670aee 100644 (file)
@@ -893,7 +893,7 @@ address_to_str_buf(const address *addr, gchar *buf)
   }
 }
 
-gchar* oid_to_str(guint8 *oid, gint oid_len) {
+gchar* oid_to_str(const guint8 *oid, gint oid_len) {
   /* static buffer */
   static int cnt = 0;
   static gchar strbuf[8][MAX_OID_STR_LEN];
@@ -902,7 +902,7 @@ gchar* oid_to_str(guint8 *oid, gint oid_len) {
   return oid_to_str_buf(oid, oid_len, strbuf[cnt]);
 }
 
-gchar* oid_to_str_buf(guint8 *oid, gint oid_len, gchar *buf) {
+gchar* oid_to_str_buf(const guint8 *oid, gint oid_len, gchar *buf) {
   gint i;
   guint8 byte;
   guint32 value;
index 1f030bd36d9a550ee8f369ca0485c695f391a5b6..15c9aae8137314a660e019ba9d8de365dc348159 100644 (file)
@@ -69,8 +69,8 @@ extern gchar* abs_time_secs_to_str(time_t);
 extern void    display_signed_time(gchar *, int, gint32, gint32, time_res_t);
 extern gchar*  rel_time_to_str(nstime_t*);
 extern gchar*  rel_time_to_secs_str(nstime_t*);
-extern gchar*  oid_to_str(guint8*, gint);
-extern gchar*  oid_to_str_buf(guint8*, gint, gchar*);
+extern gchar*  oid_to_str(const guint8*, gint);
+extern gchar*  oid_to_str_buf(const guint8*, gint, gchar*);
 
 
 extern char    *other_decode_bitfield_value(char *buf, guint32 val, guint32 mask,