Commit ee73bdea authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

No need for sprintf() here

This reverts commit af688c8f.
parent 4f4a8d71
...@@ -109,10 +109,9 @@ VLC_EXPORT(int, vlc_sd_probe_Add, (vlc_probe_t *, const char *, const char *, in ...@@ -109,10 +109,9 @@ VLC_EXPORT(int, vlc_sd_probe_Add, (vlc_probe_t *, const char *, const char *, in
#define VLC_SD_PROBE_HELPER(name, longname, cat) \ #define VLC_SD_PROBE_HELPER(name, longname, cat) \
static int vlc_sd_probe_Open (vlc_object_t *obj) \ static int vlc_sd_probe_Open (vlc_object_t *obj) \
{ \ { \
char psz_name[ strlen( name ) + strlen( longname ) + 20 ]; \
sprintf( psz_name, "%s{longname=\"%s\"}", name, longname ); \
return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, \ return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, \
psz_name, longname, cat); \ name "{longname=\"" longname "\"}", \
longname, cat); \
} }
/** @} */ /** @} */
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close( vlc_object_t * ); static void Close( vlc_object_t * );
VLC_SD_PROBE_HELPER("bonjour", N_("Bonjour services"), SD_CAT_LAN) VLC_SD_PROBE_HELPER("bonjour", "Bonjour services", SD_CAT_LAN)
vlc_module_begin () vlc_module_begin ()
set_shortname( "Bonjour" ) set_shortname( "Bonjour" )
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
static int Open( vlc_object_t * ); static int Open( vlc_object_t * );
static void Close( vlc_object_t * ); static void Close( vlc_object_t * );
VLC_SD_PROBE_HELPER("mtp", N_("MTP devices"), SD_CAT_DEVICES) VLC_SD_PROBE_HELPER("mtp", "MTP devices", SD_CAT_DEVICES)
vlc_module_begin() vlc_module_begin()
set_shortname( "MTP" ) set_shortname( "MTP" )
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close( vlc_object_t * ); static void Close( vlc_object_t * );
VLC_SD_PROBE_HELPER("podcast", N_("Podcasts"), SD_CAT_INTERNET) VLC_SD_PROBE_HELPER("podcast", "Podcasts", SD_CAT_INTERNET)
#define URLS_TEXT N_("Podcast URLs list") #define URLS_TEXT N_("Podcast URLs list")
#define URLS_LONGTEXT N_("Enter the list of podcasts to retrieve, " \ #define URLS_LONGTEXT N_("Enter the list of podcasts to retrieve, " \
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
static int OpenDemux ( vlc_object_t * ); static int OpenDemux ( vlc_object_t * );
static void CloseDemux ( vlc_object_t * ); static void CloseDemux ( vlc_object_t * );
VLC_SD_PROBE_HELPER("sap", N_("Network streams (SAP)"), SD_CAT_LAN) VLC_SD_PROBE_HELPER("sap", "Network streams (SAP)", SD_CAT_LAN)
vlc_module_begin () vlc_module_begin ()
set_shortname( N_("SAP")) set_shortname( N_("SAP"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment