[icinga-checkins] icinga.org: icinga-core/mfriedrich/cgis: fix compiler errors (refs #2761)

git at icinga.org git at icinga.org
Wed Aug 1 03:00:45 CEST 2012


Module: icinga-core
Branch: mfriedrich/cgis
Commit: 05b2a0054aeef1934c0c29f9cece563b958606bf
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=05b2a0054aeef1934c0c29f9cece563b958606bf

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Fri Jul  6 15:26:57 2012 +0200

fix compiler errors (refs #2761)

---

 common/shared.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/common/shared.c b/common/shared.c
index 692d305..cfd44c6 100644
--- a/common/shared.c
+++ b/common/shared.c
@@ -353,7 +353,7 @@ void strip(char *buffer) {
 /**************************************************
  *************** HASH FUNCTIONS *******************
  **************************************************/
-static unsigned long sdbm(char *str) {
+static unsigned long sdbm(const char *str) {
 	unsigned long hash = 0;
 	int c;
 
@@ -365,9 +365,7 @@ static unsigned long sdbm(char *str) {
 
 /* dual hash function */
 int hashfunc(const char *name1, const char *name2, int hashslots) {
-	unsigned int i, result;
-
-	result = 0;
+	unsigned int result = 0;
 
 	if (name1)
 		result += sdbm(name1);





More information about the icinga-checkins mailing list