mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-23 07:06:30 +00:00
MAXLEN definitely needed to be bigger to properly format fairly common connection strings. In addition, the reliance on xsnprintf helps detect cases where even this buffer is not long enough. the buffer in parse_config has been made bigger in a bit of sloppy programming, but what really needs to happen is reporting when a line cannot be properly parsed/is too big for the buffer. That is just a kludge. Signed-off-by: Dan Farina <drfarina@acm.org> Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
20 lines
377 B
C
20 lines
377 B
C
/*
|
|
* strutil.h
|
|
*
|
|
* Copyright (c) Heroku, 2010
|
|
*
|
|
*/
|
|
|
|
#ifndef _STRUTIL_H_
|
|
#define _STRUTIL_H_
|
|
|
|
#define QUERY_STR_LEN 8192
|
|
#define MAXLEN 1024
|
|
|
|
|
|
extern int xsnprintf(char *str, size_t size, const char *format, ...);
|
|
extern int sqlquery_snprintf(char *str, const char *format, ...);
|
|
extern int maxlen_snprintf(char *str, const char *format, ...);
|
|
|
|
#endif /* _STRUTIL_H_ */
|