8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:43:02 +01:00

Replace custom routine by common logic

This commit is contained in:
robocop 2004-09-26 07:48:29 +00:00
parent 81f6ff0765
commit 9344289ef7

View File

@ -40,6 +40,7 @@
#include "../jrd/gds_proto.h"
#include "../jrd/isc_f_proto.h"
#include "../jrd/utl_proto.h"
#include "../common/utils_proto.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@ -3619,15 +3620,9 @@ static int truncate_string( TEXT* string)
* not including the terminating null.
*
**************************************/
TEXT *p;
for (p = string; *p; p++);
for (p--; (p >= string) && (*p == ' '); p--);
*++p = 0;
return (p - string);
const int len = fb_utils::name_length(string);
string[len] = 0;
return len;
}