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:
Lukas Fleischer
2012-03-01 23:44:27 +01:00
parent 2c9499bf27
commit 0f4b45e624
3 changed files with 71 additions and 77 deletions

View File

@@ -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,