trim trailing spaces

This commit is contained in:
Steffen Jaeckel
2017-07-04 15:25:19 +02:00
committed by Dmitry Podgorny
parent 3feed16e2e
commit abd1b08a97
28 changed files with 180 additions and 180 deletions

View File

@@ -51,12 +51,12 @@ xmpp_stanza_t *xmpp_stanza_new(xmpp_ctx_t *ctx)
stanza->attributes = NULL;
}
return stanza;
return stanza;
}
/** Clone a stanza object.
* This function increments the reference count of the stanza object.
*
*
* @param stanza a Strophe stanza object
*
* @return the stanza object with it's reference count incremented
@@ -202,11 +202,11 @@ xmpp_ctx_t *xmpp_stanza_get_context(const xmpp_stanza_t * const stanza)
}
/** Determine if a stanza is a text node.
*
*
* @param stanza a Strophe stanza object
*
* @return TRUE if the stanza is a text node, FALSE otherwise
*
*
* @ingroup Stanza
*/
int xmpp_stanza_is_text(xmpp_stanza_t * const stanza)
@@ -215,11 +215,11 @@ int xmpp_stanza_is_text(xmpp_stanza_t * const stanza)
}
/** Determine if a stanza is a tag node.
*
*
* @param stanza a Strophe stanza object
*
* @return TRUE if the stanza is a tag node, FALSE otherwise
*
*
* @ingroup Stanza
*/
int xmpp_stanza_is_tag(xmpp_stanza_t * const stanza)
@@ -466,7 +466,7 @@ int xmpp_stanza_to_text(xmpp_stanza_t *stanza,
return XMPP_EMEM;
}
}
buffer[length - 1] = 0;
*buf = buffer;
@@ -476,7 +476,7 @@ int xmpp_stanza_to_text(xmpp_stanza_t *stanza,
}
/** Set the name of a stanza.
*
*
* @param stanza a Strophe stanza object
* @param name a string with the name of the stanza
*
@@ -485,7 +485,7 @@ int xmpp_stanza_to_text(xmpp_stanza_t *stanza,
*
* @ingroup Stanza
*/
int xmpp_stanza_set_name(xmpp_stanza_t *stanza,
int xmpp_stanza_set_name(xmpp_stanza_t *stanza,
const char * const name)
{
if (stanza->type == XMPP_STANZA_TEXT) return XMPP_EINVOP;
@@ -533,14 +533,14 @@ int xmpp_stanza_get_attribute_count(xmpp_stanza_t * const stanza)
/** Get all attributes for a stanza object.
* This function populates the array with attributes from the stanza. The
* attr array will be in the format: attr[i] = attribute name,
* attr array will be in the format: attr[i] = attribute name,
* attr[i+1] = attribute value.
*
* @param stanza a Strophe stanza object
* @param attr the string array to populate
* @param attrlen the size of the array
*
* @return the number of slots used in the array, which will be 2 times the
* @return the number of slots used in the array, which will be 2 times the
* number of attributes in the stanza
*
* @ingroup Stanza
@@ -577,7 +577,7 @@ int xmpp_stanza_get_attributes(xmpp_stanza_t * const stanza,
}
/** Set an attribute for a stanza object.
*
*
* @param stanza a Strophe stanza object
* @param key a string with the attribute name
* @param value a string with the attribute value
@@ -703,7 +703,7 @@ int xmpp_stanza_set_text(xmpp_stanza_t *stanza,
const char * const text)
{
if (stanza->type == XMPP_STANZA_TAG) return XMPP_EINVOP;
stanza->type = XMPP_STANZA_TEXT;
if (stanza->data) xmpp_free(stanza->ctx, stanza->data);
@@ -723,7 +723,7 @@ int xmpp_stanza_set_text(xmpp_stanza_t *stanza,
* @param size the length of the text
*
* @return XMPP_EOK (0) on success and a number less than 0 on failure
*
*
* @ingroup Stanza
*/
int xmpp_stanza_set_text_with_size(xmpp_stanza_t *stanza,
@@ -822,7 +822,7 @@ const char *xmpp_stanza_get_from(xmpp_stanza_t * const stanza)
/** Get the first child of stanza with name.
* This function searches all the immediate children of stanza for a child
* stanza that matches the name. The first matching child is returned.
*
*
* @param stanza a Strophe stanza object
* @param name a string with the name to match
*
@@ -830,11 +830,11 @@ const char *xmpp_stanza_get_from(xmpp_stanza_t * const stanza)
*
* @ingroup Stanza
*/
xmpp_stanza_t *xmpp_stanza_get_child_by_name(xmpp_stanza_t * const stanza,
xmpp_stanza_t *xmpp_stanza_get_child_by_name(xmpp_stanza_t * const stanza,
const char * const name)
{
xmpp_stanza_t *child;
for (child = stanza->children; child; child = child->next) {
if (child->type == XMPP_STANZA_TAG &&
(strcmp(name, xmpp_stanza_get_name(child)) == 0))
@@ -848,7 +848,7 @@ xmpp_stanza_t *xmpp_stanza_get_child_by_name(xmpp_stanza_t * const stanza,
* This function searches all the immediate children of a stanza for a child
* stanza that matches the namespace provided. The first matching child
* is returned.
*
*
* @param stanza a Strophe stanza object
* @param ns a string with the namespace to match
*
@@ -867,7 +867,7 @@ xmpp_stanza_t *xmpp_stanza_get_child_by_ns(xmpp_stanza_t * const stanza,
if (child_ns && strcmp(ns, child_ns) == 0)
break;
}
return child;
}
@@ -915,13 +915,13 @@ xmpp_stanza_t *xmpp_stanza_get_child_by_name_and_ns(xmpp_stanza_t * const stanza
*
* @ingroup Stanza
*/
xmpp_stanza_t *xmpp_stanza_get_children(xmpp_stanza_t * const stanza)
xmpp_stanza_t *xmpp_stanza_get_children(xmpp_stanza_t * const stanza)
{
return stanza->children;
}
/** Get the next sibling of a stanza.
*
*
* @param stanza a Strophe stanza object
*
* @return the next sibling stanza or NULL if there are no more siblings
@@ -982,7 +982,7 @@ char *xmpp_stanza_get_text(xmpp_stanza_t * const stanza)
/** Get the text data pointer for a text stanza.
* This function copies returns the raw pointer to the text data in the
* stanza. This should only be used in very special cases where the
* stanza. This should only be used in very special cases where the
* caller needs to translate the datatype as this will save a double
* allocation. The caller should not hold onto this pointer, and is
* responsible for allocating a copy if it needs one.
@@ -1087,7 +1087,7 @@ const char *xmpp_stanza_get_attribute(xmpp_stanza_t * const stanza,
{
if (stanza->type != XMPP_STANZA_TAG)
return NULL;
if (!stanza->attributes)
return NULL;