summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-17 18:17:19 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-17 18:17:19 +0000
commita2041b6cda1acfc73fbcd0140d992717f78d794e (patch)
tree74ab2260b064201ce2cf5c834d0ba0a847fd1d4b /src/libs
parent4601b23d7585c3f0ff815353e8cb38d50cad28d6 (diff)
Fixed zabbix_get.
git-svn-id: svn://svn.zabbix.com/trunk@2331 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/zbxcommon/str.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/libs/zbxcommon/str.c b/src/libs/zbxcommon/str.c
index efd5bbf3..b35b73a4 100644
--- a/src/libs/zbxcommon/str.c
+++ b/src/libs/zbxcommon/str.c
@@ -178,3 +178,29 @@ int num_param(const char *param)
return ret;
}
+/******************************************************************************
+ * *
+ * Function: delete_reol *
+ * *
+ * Purpose: delete all right EOL characters *
+ * *
+ * Parameters: c - string to delete EOL *
+ * *
+ * Return value: the string wtihout EOL *
+ * *
+ * Author: Alexei Vladishev *
+ * *
+ * Comments: *
+ * *
+ ******************************************************************************/
+void delete_reol(char *c)
+{
+ int i,j;
+
+ j=0;
+ for(i=(int)strlen(c)-1;i>=0;i--)
+ {
+ if( c[i] != '\n') break;
+ c[i]=0;
+ }
+}