aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/odbc/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/odbc/socket.c')
-rw-r--r--src/interfaces/odbc/socket.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/interfaces/odbc/socket.c b/src/interfaces/odbc/socket.c
index 650ec9ecb00..de695058b9c 100644
--- a/src/interfaces/odbc/socket.c
+++ b/src/interfaces/odbc/socket.c
@@ -195,17 +195,19 @@ SOCK_put_n_char(SocketClass *self, char *buffer, int len)
/*
* bufsize must include room for the null terminator
* will read at most bufsize-1 characters + null.
+ * returns TRUE if truncation occurs.
*/
-void
+BOOL
SOCK_get_string(SocketClass *self, char *buffer, int bufsize)
{
register int lf = 0;
for (lf = 0; lf < bufsize; lf++)
if (!(buffer[lf] = SOCK_get_next_byte(self)))
- return;
+ return FALSE;
buffer[bufsize - 1] = '\0';
+ return TRUE;
}