diff options
| author | Roy Marples <roy@marples.name> | 2008-06-29 18:28:19 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-06-29 18:28:19 +0000 |
| commit | abc5592709affc9ec3f88ec786b624b69ee9f28f (patch) | |
| tree | 402ab0d388cb1921a29c350c84831c8b311d1174 /dhcpcd.h | |
| parent | 1f96a7d73e5e735ffe3a34ddb892abda5cd7eaae (diff) | |
| download | dhcpcd-abc5592709affc9ec3f88ec786b624b69ee9f28f.tar.xz | |
Save a few bytes by treating some strings like DHCP options, having the first byte as the length.
Diffstat (limited to 'dhcpcd.h')
| -rw-r--r-- | dhcpcd.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -41,8 +41,8 @@ #define DEFAULT_TIMEOUT 30 #define DEFAULT_LEASETIME 3600 /* 1 hour */ -#define CLASS_ID_MAX_LEN 48 -#define CLIENT_ID_MAX_LEN 48 +#define CLASSID_MAX_LEN 48 +#define CLIENTID_MAX_LEN 48 #define USERCLASS_MAX_LEN 255 #ifdef THERE_IS_NO_FORK @@ -72,12 +72,11 @@ struct options { char interface[IF_NAMESIZE]; char hostname[MAXHOSTNAMELEN]; int fqdn; - char classid[CLASS_ID_MAX_LEN]; - char clientid[CLIENT_ID_MAX_LEN]; - char userclass[USERCLASS_MAX_LEN]; + char classid[CLASSID_MAX_LEN + 1]; + char clientid[CLIENTID_MAX_LEN + 1]; + char userclass[USERCLASS_MAX_LEN + 1]; uint8_t reqmask[256 / 8]; uint8_t nomask[256 / 8]; - size_t userclass_len; uint32_t leasetime; time_t timeout; int metric; |
