return 0;
}
-void serialize_in_addrs(FILE *f, const char *key, const struct in_addr *addresses, size_t size) {
+void serialize_in_addrs(FILE *f, const struct in_addr *addresses, size_t size) {
unsigned i;
assert(f);
- assert(key);
assert(addresses);
assert(size);
- fprintf(f, "%s=", key);
-
for (i = 0; i < size; i++)
fprintf(f, "%s%s", inet_ntoa(addresses[i]),
(i < (size - 1)) ? " ": "");
-
- fputs("\n", f);
}
int deserialize_in_addrs(struct in_addr **ret, const char *string) {
_cleanup_free_ struct in_addr *addresses = NULL;
int size = 0;
- char *word, *state;
+ const char *word, *state;
size_t len;
assert(ret);
int deserialize_in6_addrs(struct in6_addr **ret, const char *string) {
_cleanup_free_ struct in6_addr *addresses = NULL;
int size = 0;
- char *word, *state;
+ const char *word, *state;
size_t len;
assert(ret);
int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t *ret_allocated, const char *string) {
_cleanup_free_ struct sd_dhcp_route *routes = NULL;
size_t size = 0, allocated = 0;
- char *word, *state;
+ const char *word, *state;
size_t len;
assert(ret);