瀏覽代碼

[build] Return const char * from uuid_ntoa()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
David Decotigny 7 年之前
父節點
當前提交
04c7befa73
共有 3 個文件被更改,包括 3 次插入3 次删除
  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 查看文件

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 查看文件

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 查看文件

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…
取消
儲存