platform: expose internal buffer for to_string() functions

I'd like to reuse this buffer for other to-string functions that
are platform related.

(cherry picked from commit 655a0e71d4)
This commit is contained in:
Thomas Haller 2015-04-27 15:41:33 +02:00
parent 988e8139d0
commit 27c87c75b8
2 changed files with 2 additions and 1 deletions

View file

@ -2632,7 +2632,7 @@ _lifetime_summary_to_string (gint32 now, guint32 timestamp, guint32 preferred, g
return buf;
}
static char _nm_platform_to_string_buffer[256];
char _nm_platform_to_string_buffer[256];
const char *
nm_platform_link_to_string (const NMPlatformLink *link)

View file

@ -315,6 +315,7 @@ typedef struct {
extern const NMPlatformVTableRoute nm_platform_vtable_route_v4;
extern const NMPlatformVTableRoute nm_platform_vtable_route_v6;
extern char _nm_platform_to_string_buffer[256];
typedef struct {
int peer;