From d38794635a763174d62790cf350ee5665737c6ef Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Sat, 1 Jun 2019 19:22:13 +0100 Subject: Use errno to handle getconfint() failing. --- config.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config.h') diff --git a/config.h b/config.h index c997750..ce80177 100644 --- a/config.h +++ b/config.h @@ -13,6 +13,7 @@ #define DEBUG_CRIT 0 #define DEBUG_SOME 1 #define DEBUG_FULL 2 +#define ECONFINT 1 // errno value if getconfint() failed #define MAXCHAR 1000 @@ -24,6 +25,7 @@ int getconfstr(char *confname, char *filename, char* dest); // Returns the avlue of the configuration option with name // 'confname' from configuration file 'filename'. +// Sets errno to 0 on success, or ECONFINT if it fails, in which case the return value is undefined. int getconfint(char *confname, char *filename); // Check the password provided in the string 'str' against what is in -- cgit v1.2.3