Get rid of string structures
These were only used to construct constant strings with additional length fields. However, we can just use standard constant character arrays instead and let the compiler calculate the string length. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
@@ -210,7 +210,6 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define STRING_BUILD(str) {str, sizeof (str) - 1}
|
||||
#define STRINGIFY(x) #x
|
||||
#define TOSTRING(x) STRINGIFY(x)
|
||||
#define __FILE_POS__ __FILE__ ":" TOSTRING(__LINE__)
|
||||
@@ -248,11 +247,6 @@ struct dmon_conf {
|
||||
unsigned log; /* log daemon activity */
|
||||
};
|
||||
|
||||
struct string {
|
||||
const char *str;
|
||||
const int len;
|
||||
};
|
||||
|
||||
enum datefmt {
|
||||
DATEFMT_MMDDYYYY = 1,
|
||||
DATEFMT_DDMMYYYY,
|
||||
|
||||
Reference in New Issue
Block a user