diff options
author | Thomas Haller <thaller@redhat.com> | 2020-04-06 13:17:34 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-04-09 21:51:06 +0200 |
commit | 9d8a8505bf4237f9393439638a41b6eb3e313e40 (patch) | |
tree | 8e7e16f91b31cf1cac673d56998b4ca18006c646 | |
parent | c6426d8123803ec094b4a47bbb5a9df628ef0b7e (diff) | |
download | NetworkManager-9d8a8505bf4237f9393439638a41b6eb3e313e40.tar.gz |
shared/strbuf: don't have const values in NMStrBuf
Before, if a struct had a field of type NMStrBuf (which is sensible to do),
then you could not longer initialize the entire struct with
*ptr = (Type) { };
because NMStrBuf contained const fields.
The user should never set these fields directly and use nm_str_buf_*() to modify
them them. But no longer mark them as const, because that breaks valid
use cases.
-rw-r--r-- | shared/nm-glib-aux/nm-str-buf.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/nm-glib-aux/nm-str-buf.h b/shared/nm-glib-aux/nm-str-buf.h index afbb001ca1..4c015aa43c 100644 --- a/shared/nm-glib-aux/nm-str-buf.h +++ b/shared/nm-glib-aux/nm-str-buf.h @@ -13,7 +13,7 @@ typedef struct _NMStrBuf { char *_str; union { - const gsize len; + /*const*/ gsize len; gsize _len; }; gsize _allocated; |