LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 0013-libteamdctl-add-notice-for-caller-to-do-not-modify-o.patch of Package libteam (Project home:ods:ppc64)

From 0cc5ad9dc9f19fbf224f15111e7adc678854c7a1 Mon Sep 17 00:00:00 2001
From: Jiri Pirko <jiri@resnulli.us>
Date: Wed, 5 Mar 2014 09:17:12 +0100
Subject: [patch libteam] libteamdctl: add notice for caller to do not modify
 or free certain strings

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 libteamdctl/libteamdctl.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/libteamdctl/libteamdctl.c b/libteamdctl/libteamdctl.c
index 93b3ac0..b981ed8 100644
--- a/libteamdctl/libteamdctl.c
+++ b/libteamdctl/libteamdctl.c
@@ -474,6 +474,8 @@ int teamdctl_port_config_update_raw(struct teamdctl *tdc,
  * Gets raw port config string.
  * Does direct method call avoiding possible stale data in the cache.
  *
+ * Note: the obtained string should not be modified or freed by caller.
+ *
  * Returns: zero on success or negative number in case of an error.
  **/
 TEAMDCTL_EXPORT
@@ -508,6 +510,8 @@ int teamdctl_port_config_get_raw_direct(struct teamdctl *tdc,
  * Using reply cache. Return value is never NULL.
  * To refresh the cache, use teamdctl_refresh function.
  *
+ * Note: the obtained string should not be modified or freed by caller.
+ *
  * Returns: pointer to cached config string.
  **/
 TEAMDCTL_EXPORT
@@ -524,6 +528,8 @@ char *teamdctl_config_get_raw(struct teamdctl *tdc)
  * Gets raw config string.
  * Does direct method call avoiding possible stale data in the cache.
  *
+ * Note: the obtained string should not be modified or freed by caller.
+ *
  * Returns: zero on success or negative number in case of an error.
  **/
 TEAMDCTL_EXPORT
@@ -540,6 +546,8 @@ int teamdctl_config_get_raw_direct(struct teamdctl *tdc, char **p_cfg)
  * Using reply cache. Return value is never NULL.
  * To refresh the cache, use teamdctl_refresh function.
  *
+ * Note: the obtained string should not be modified or freed by caller.
+ *
  * Returns: pointer to cached actual config string.
  **/
 TEAMDCTL_EXPORT
@@ -556,6 +564,8 @@ char *teamdctl_config_actual_get_raw(struct teamdctl *tdc)
  * Gets raw actual config string.
  * Does direct method call avoiding possible stale data in the cache.
  *
+ * Note: the obtained string should not be modified or freed by caller.
+ *
  * Returns: zero on success or negative number in case of an error.
  **/
 TEAMDCTL_EXPORT
@@ -572,6 +582,8 @@ int teamdctl_config_actual_get_raw_direct(struct teamdctl *tdc, char **p_cfg)
  * Using reply cache. Return value is never NULL.
  * To refresh the cache, use teamdctl_refresh function.
  *
+ * Note: the obtained string should not be modified or freed by caller.
+ *
  * Returns: pointer to cached state string.
  **/
 TEAMDCTL_EXPORT
@@ -588,6 +600,8 @@ char *teamdctl_state_get_raw(struct teamdctl *tdc)
  * Gets raw state string.
  * Does direct method call avoiding possible stale data in the cache.
  *
+ * Note: the obtained string should not be modified or freed by caller.
+ *
  * Returns: zero on success or negative number in case of an error.
  **/
 TEAMDCTL_EXPORT
-- 
1.8.5.3