diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-06-01 19:22:13 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-06-01 19:22:13 +0100 |
commit | d38794635a763174d62790cf350ee5665737c6ef (patch) | |
tree | 77068c5eca225e658baea54ff2a833b05f7c9ece /config.h | |
parent | c3f421e4046faf8b5f39cd1ad36bc4869405fcc9 (diff) |
Use errno to handle getconfint() failing.
Diffstat (limited to 'config.h')
-rw-r--r-- | config.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 |