state = KEY;
last_key_whitespace = (size_t) -1;
- if (!greedy_realloc((void**) &key, &key_alloc, n_key+2)) {
+ if (!GREEDY_REALLOC(key, key_alloc, n_key+2)) {
r = -ENOMEM;
goto fail;
}
else if (last_key_whitespace == (size_t) -1)
last_key_whitespace = n_key;
- if (!greedy_realloc((void**) &key, &key_alloc, n_key+2)) {
+ if (!GREEDY_REALLOC(key, key_alloc, n_key+2)) {
r = -ENOMEM;
goto fail;
}
else if (!strchr(WHITESPACE, c)) {
state = VALUE;
- if (!greedy_realloc((void**) &value, &value_alloc, n_value+2)) {
+ if (!GREEDY_REALLOC(value, value_alloc, n_value+2)) {
r = -ENOMEM;
goto fail;
}
else if (last_value_whitespace == (size_t) -1)
last_value_whitespace = n_value;
- if (!greedy_realloc((void**) &value, &value_alloc, n_value+2)) {
+ if (!GREEDY_REALLOC(value, value_alloc, n_value+2)) {
r = -ENOMEM;
goto fail;
}
if (!strchr(newline, c)) {
/* Escaped newlines we eat up entirely */
- if (!greedy_realloc((void**) &value, &value_alloc, n_value+2)) {
+ if (!GREEDY_REALLOC(value, value_alloc, n_value+2)) {
r = -ENOMEM;
goto fail;
}
else if (c == '\\')
state = SINGLE_QUOTE_VALUE_ESCAPE;
else {
- if (!greedy_realloc((void**) &value, &value_alloc, n_value+2)) {
+ if (!GREEDY_REALLOC(value, value_alloc, n_value+2)) {
r = -ENOMEM;
goto fail;
}
state = SINGLE_QUOTE_VALUE;
if (!strchr(newline, c)) {
- if (!greedy_realloc((void**) &value, &value_alloc, n_value+2)) {
+ if (!GREEDY_REALLOC(value, value_alloc, n_value+2)) {
r = -ENOMEM;
goto fail;
}
else if (c == '\\')
state = DOUBLE_QUOTE_VALUE_ESCAPE;
else {
- if (!greedy_realloc((void**) &value, &value_alloc, n_value+2)) {
+ if (!GREEDY_REALLOC(value, value_alloc, n_value+2)) {
r = -ENOMEM;
goto fail;
}
state = DOUBLE_QUOTE_VALUE;
if (!strchr(newline, c)) {
- if (!greedy_realloc((void**) &value, &value_alloc, n_value+2)) {
+ if (!GREEDY_REALLOC(value, value_alloc, n_value+2)) {
r = -ENOMEM;
goto fail;
}
int executable_is_script(const char *path, char **interpreter) {
int r;
- char _cleanup_free_ *line = NULL;
+ _cleanup_free_ char *line = NULL;
int len;
char *ans;