discover-image: coding style fixlets

This commit is contained in:
Yu Watanabe
2025-06-11 21:54:35 +09:00
parent 114ad16c4d
commit d654b9dcfd
2 changed files with 6 additions and 6 deletions

View File

@@ -117,7 +117,7 @@ static const char *const image_root_runtime_table[_IMAGE_CLASS_MAX] = {
DEFINE_STRING_TABLE_LOOKUP_TO_STRING(image_root_runtime, ImageClass);
static Image *image_free(Image *i) {
static Image* image_free(Image *i) {
assert(i);
free(i->name);
@@ -136,7 +136,7 @@ DEFINE_TRIVIAL_REF_UNREF_FUNC(Image, image, image_free);
DEFINE_HASH_OPS_WITH_VALUE_DESTRUCTOR(image_hash_ops, char, string_hash_func, string_compare_func,
Image, image_unref);
static char **image_settings_path(Image *image) {
static char** image_settings_path(Image *image) {
_cleanup_strv_free_ char **l = NULL;
_cleanup_free_ char *fn = NULL;
size_t i = 0;
@@ -653,7 +653,7 @@ static int pick_image_search_path(
return 0;
}
static char **make_possible_filenames(ImageClass class, const char *image_name) {
static char** make_possible_filenames(ImageClass class, const char *image_name) {
_cleanup_strv_free_ char **l = NULL;
assert(image_name);

View File

@@ -45,8 +45,8 @@ typedef struct Image {
void *userdata;
} Image;
Image *image_unref(Image *i);
Image *image_ref(Image *i);
Image* image_unref(Image *i);
Image* image_ref(Image *i);
DEFINE_TRIVIAL_CLEANUP_FUNC(Image*, image_unref);
@@ -73,7 +73,7 @@ int image_read_metadata(Image *i, const ImagePolicy *image_policy);
bool image_in_search_path(RuntimeScope scope, ImageClass class, const char *root, const char *image);
static inline char **image_extension_release(Image *image, ImageClass class) {
static inline char** image_extension_release(Image *image, ImageClass class) {
assert(image);
if (class == IMAGE_SYSEXT)