Browse Source

[build] Return const char * from uuid_ntoa()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
David Decotigny 7 years ago
parent
commit
04c7befa73
3 changed files with 3 additions and 3 deletions
  1. 1
    1
      src/core/uuid.c
  2. 1
    1
      src/include/ipxe/uuid.h
  3. 1
    1
      src/net/peerdisc.c

+ 1
- 1
src/core/uuid.c View File

@@ -40,7 +40,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
40 40
  * @v uuid		UUID
41 41
  * @ret string		UUID in canonical form
42 42
  */
43
-char * uuid_ntoa ( const union uuid *uuid ) {
43
+const char * uuid_ntoa ( const union uuid *uuid ) {
44 44
 	static char buf[37]; /* "00000000-0000-0000-0000-000000000000" */
45 45
 
46 46
 	sprintf ( buf, "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",

+ 1
- 1
src/include/ipxe/uuid.h View File

@@ -47,6 +47,6 @@ static inline void uuid_mangle ( union uuid *uuid ) {
47 47
 	__bswap_16s ( &uuid->canonical.c );
48 48
 }
49 49
 
50
-extern char * uuid_ntoa ( const union uuid *uuid );
50
+extern const char * uuid_ntoa ( const union uuid *uuid );
51 51
 
52 52
 #endif /* _IPXE_UUID_H */

+ 1
- 1
src/net/peerdisc.c View File

@@ -408,7 +408,7 @@ static struct peerdisc_segment * peerdisc_create ( const char *id ) {
408 408
 	} random_uuid;
409 409
 	size_t uuid_len;
410 410
 	size_t id_len;
411
-	char *uuid;
411
+	const char *uuid;
412 412
 	char *uuid_copy;
413 413
 	char *id_copy;
414 414
 	unsigned int i;

Loading…
Cancel
Save