static int vl_server(void) {
_cleanup_(sd_varlink_server_unrefp) sd_varlink_server *varlink_server = NULL;
- _cleanup_(hashmap_freep) Hashmap *polkit_registry = NULL;
+ _cleanup_hashmap_free_ Hashmap *polkit_registry = NULL;
int r;
r = varlink_server_new(&varlink_server, SD_VARLINK_SERVER_INHERIT_USERDATA, /* userdata= */ &polkit_registry);
}
int userns_enter_and_pin(int userns_fd, pid_t *ret_pid) {
- _cleanup_(close_pairp) int pfd[2] = EBADF_PAIR;
+ _cleanup_close_pair_ int pfd[2] = EBADF_PAIR;
_cleanup_(sigkill_waitp) pid_t pid = 0;
ssize_t n;
char x;
.until = now(CLOCK_MONOTONIC) + 15 * USEC_PER_SEC,
};
- _cleanup_(strv_free_erasep) char **acquired = NULL;
+ _cleanup_strv_free_erase_ char **acquired = NULL;
r = ask_password_auto(
&req,
ASK_PASSWORD_ACCEPT_CACHED|
if (arg_varlink) {
_cleanup_(sd_varlink_server_unrefp) sd_varlink_server *varlink_server = NULL;
- _cleanup_(hashmap_freep) Hashmap *polkit_registry = NULL;
+ _cleanup_hashmap_free_ Hashmap *polkit_registry = NULL;
/* Invocation as Varlink service */
class < 0 ? (c < _IMAGE_CLASS_MAX) : (c == class);
c++) {
- _cleanup_(hashmap_freep) Hashmap *h = NULL;
+ _cleanup_hashmap_free_ Hashmap *h = NULL;
h = hashmap_new(&image_hash_ops);
if (!h)
}
static int connect_as(int fd, const struct sockaddr *sa, socklen_t salen, uid_t uid, gid_t gid) {
- _cleanup_(close_pairp) int pfd[2] = EBADF_PAIR;
+ _cleanup_close_pair_ int pfd[2] = EBADF_PAIR;
ssize_t n;
int r;
const sd_varlink_symbol *symbol,
int level) {
- _cleanup_(set_freep) Set *input_set = NULL, *output_set = NULL;
+ _cleanup_set_free_ Set *input_set = NULL, *output_set = NULL;
const char *symbol_name;
int r;
}
int varlink_idl_consistent(const sd_varlink_interface *interface, int level) {
- _cleanup_(set_freep) Set *name_set = NULL;
+ _cleanup_set_free_ Set *name_set = NULL;
int r;
assert(interface);
/* Split the key by NUL. Set the last item as authtok. */
- _cleanup_(strv_free_erasep) char **passwords = strv_parse_nulstr(p, n);
+ _cleanup_strv_free_erase_ char **passwords = strv_parse_nulstr(p, n);
if (!passwords)
return pam_log_oom(handle);
static int run(int argc, char *argv[]) {
usec_t start_time, listen_idle_usec, last_busy_usec = USEC_INFINITY;
_cleanup_(sd_varlink_server_unrefp) sd_varlink_server *server = NULL;
- _cleanup_(hashmap_freep) Hashmap *polkit_registry = NULL;
+ _cleanup_hashmap_free_ Hashmap *polkit_registry = NULL;
_cleanup_(pidref_done) PidRef parent = PIDREF_NULL;
unsigned n_iterations = 0;
int m, listen_fd, r;
#endif
int manager_startup(Manager *m) {
- _cleanup_(set_freep) Set *fdstore_inodes = NULL, *registry_inodes = NULL;
+ _cleanup_set_free_ Set *fdstore_inodes = NULL, *registry_inodes = NULL;
void *p;
int r;
if (r < 0)
return log_error_errno(r, "Failed to acquire PIN from environment: %m");
if (r == 0) {
- _cleanup_(strv_free_erasep) char **l = NULL;
+ _cleanup_strv_free_erase_ char **l = NULL;
AskPasswordRequest req = {
.tty_fd = -EBADF,
dns_stream_unref);
int dns_stream_disconnect_all(Manager *m) {
- _cleanup_(set_freep) Set *closed = NULL;
+ _cleanup_set_free_ Set *closed = NULL;
int r;
assert(m);
req->message = UI_get0_output_string(uis);
- _cleanup_(strv_freep) char **l = NULL;
+ _cleanup_strv_free_ char **l = NULL;
r = ask_password_auto(req, ASK_PASSWORD_ACCEPT_CACHED|ASK_PASSWORD_PUSH_CACHE, &l);
if (r < 0) {
log_error_errno(r, "Failed to query for PIN: %m");
}
TEST(hashmap_get2) {
- _cleanup_(hashmap_free_free_freep) Hashmap *m = NULL;
+ _cleanup_hashmap_free_free_free_ Hashmap *m = NULL;
char *r;
char *val;
char key_orig[] = "Key 1";