#include <pwd.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
void func(void) {
const char *file_format = "%s/.config";
size_t len;
char *pathname;
struct passwd *pwd;
pwd = getpwuid(getuid());
if (pwd == NULL) {
}
len = strlen(pwd->pw_dir) + strlen(file_format) + 1;
pathname = (char *)malloc(len);
if (NULL == pathname) {
}
int r = snprintf(pathname, len, file_format, pwd->pw_dir);
if (r < 0 || r >= len) {
}
if (unlink(pathname) != 0) {
}
free(pathname);
}