summaryrefslogtreecommitdiff
path: root/include/asterisk/stringfields.h
diff options
context:
space:
mode:
authorSean Bright <sean.bright@gmail.com>2017-12-22 09:14:07 -0500
committerSean Bright <sean.bright@gmail.com>2017-12-22 09:14:07 -0500
commitce3d56920b15facbb64b3caf0d823a3f57c0dded (patch)
tree0ea4a13885afb281237b3747e85eb6315863ae0a /include/asterisk/stringfields.h
parent35a2e09c655f26067db0f51837704886d6ffff78 (diff)
Remove as much trailing whitespace as possible.
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
Diffstat (limited to 'include/asterisk/stringfields.h')
-rw-r--r--include/asterisk/stringfields.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asterisk/stringfields.h b/include/asterisk/stringfields.h
index c24424b0a..0e0d20aca 100644
--- a/include/asterisk/stringfields.h
+++ b/include/asterisk/stringfields.h
@@ -27,7 +27,7 @@
Using this functionality is quite simple. An example structure
with three fields is defined like this:
-
+
\code
struct sample_fields {
int x1;
@@ -39,14 +39,14 @@
long x2;
};
\endcode
-
+
When an instance of this structure is allocated (either statically or
dynamically), the fields and the pool of storage for them must be
initialized:
-
+
\code
struct sample_fields *x;
-
+
x = ast_calloc(1, sizeof(*x));
if (x == NULL || ast_string_field_init(x, 252)) {
if (x)
@@ -62,7 +62,7 @@
ast_string_field_init(x, 0) will reset fields to the
initial value while keeping the pool allocated.
-
+
Reading the fields is much like using 'const char * const' fields in the
structure: you cannot write to the field or to the memory it points to.
@@ -88,7 +88,7 @@
When the structure instance is no longer needed, the fields
and their storage pool must be freed:
-
+
\code
ast_string_field_free_memory(x);
ast_free(x);