about summary refs log tree commit diff
path: root/src/tool/tool.c
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2009-09-11 22:52:12 +0200
committerAlexander Barton <alex@barton.de>2009-09-11 22:52:12 +0200
commit8fd0e29d463c934756dce7a562f09ea831b5d968 (patch)
treecd25067d357cf30a59d6781c818f323c64d92737 /src/tool/tool.c
parentbfa48f3448a140048386810f97049ad8200c1842 (diff)
downloadngircd-8fd0e29d463c934756dce7a562f09ea831b5d968.tar.gz
ngircd-8fd0e29d463c934756dce7a562f09ea831b5d968.zip
Fix "implicit conversion shortens 64-bit value" warning
This patch fixes the following gcc warning in our sources:
"implicit conversion shortens 64-bit value into a 32-bit value"
Diffstat (limited to 'src/tool/tool.c')
-rw-r--r--src/tool/tool.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/tool/tool.c b/src/tool/tool.c
index a24c1602..c973539c 100644
--- a/src/tool/tool.c
+++ b/src/tool/tool.c
@@ -1,6 +1,6 @@
 /*
  * ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2008 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2009 Alexander Barton (alex@barton.de)
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -107,16 +107,19 @@ ngt_TrimLastChr( char *String, const char Chr)
 	/* If last character in the string matches Chr, remove it.
 	 * Empty strings are handled correctly. */
 
-        unsigned int len;
+	size_t len;
 
-	assert( String != NULL );
+	assert(String != NULL);
 
-	len = strlen( String );
-	if( len == 0 ) return;
+	len = strlen(String);
+	if(len == 0)
+		return;
 
 	len--;
 
-	if( String[len] == Chr ) String[len] = '\0';
+	if(String[len] == Chr)
+		String[len] = '\0';
 } /* ngt_TrimLastChr */
 
+
 /* -eof- */