pulse-server: module-zeroconf-publish: remove static

`sysname` need not be static since `avahi_string_list_add_pair()`
creates a copy, and no other parts of the code have reference to
`sysname` that would require static lifetime.

Furthermore, do not hardcode the size of the array.
This commit is contained in:
Barnabás Pőcze 2021-06-25 19:20:33 +02:00
parent 324894e605
commit 9994a763d6

View file

@ -315,7 +315,7 @@ static AvahiStringList* txt_record_server_data(struct pw_core_info *info, AvahiS
{
const char *t;
struct utsname u;
static char sysname[256];
char sysname[sizeof(u.sysname) + sizeof(u.machine) + sizeof(u.release)];
spa_assert(info);
spa_assert(uname(&u) >= 0);