util: New macro CONST_CAST.
[openvswitch] / lib / dynamic-string.c
index e7ad73cd667996bd4f7628ed0bfb7ef34fb6503d..b648eef6549a28ab9c3c1b77e0f1beb1074ddcc3 100644 (file)
@@ -311,7 +311,7 @@ ds_cstr(struct ds *ds)
 const char *
 ds_cstr_ro(const struct ds *ds)
 {
-    return ds_cstr((struct ds *) ds);
+    return ds_cstr(CONST_CAST(struct ds *, ds));
 }
 
 /* Returns a null-terminated string representing the current contents of 'ds',