• spiiroin's avatar
    [dyn-config] Fix miscellaneous issues · 1c90322a
    spiiroin authored
    String fields in modedata_t structures are filled in via functions that
    return 'gchar *' pointers - adjust structure data types and release
    function accordingly.
    
    The modelist_free() function uses g_list_foreach() iterator and a
    callback function that is not appropriate for the action, and then uses
    a cast to hide any compiler warnings - get rid of the cast by using
    g_list_free_full() iterator and a suitable callback function.
    
    The modelist_load() function looks complex and indiscriminately loads
    all files from dynamic mode configuration directory. If there are for
    example editor backup files present, this can lead to hard to detect
    issues - simplify the logic and use glob pattern expansion to derive
    list of files to load.
    Signed-off-by: spiiroin's avatarSimo Piiroinen <simo.piiroinen@jollamobile.com>
    1c90322a
usb_moded-dyn-config.h 6.78 KB