Browse Source

[build] Return const char * from uuid_ntoa()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
David Decotigny 8 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
  * @v uuid		UUID
40
  * @v uuid		UUID
41
  * @ret string		UUID in canonical form
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
 	static char buf[37]; /* "00000000-0000-0000-0000-000000000000" */
44
 	static char buf[37]; /* "00000000-0000-0000-0000-000000000000" */
45
 
45
 
46
 	sprintf ( buf, "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",
46
 	sprintf ( buf, "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",

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

47
 	__bswap_16s ( &uuid->canonical.c );
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
 #endif /* _IPXE_UUID_H */
52
 #endif /* _IPXE_UUID_H */

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

408
 	} random_uuid;
408
 	} random_uuid;
409
 	size_t uuid_len;
409
 	size_t uuid_len;
410
 	size_t id_len;
410
 	size_t id_len;
411
-	char *uuid;
411
+	const char *uuid;
412
 	char *uuid_copy;
412
 	char *uuid_copy;
413
 	char *id_copy;
413
 	char *id_copy;
414
 	unsigned int i;
414
 	unsigned int i;

Loading…
Cancel
Save