]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Return const char * from uuid_ntoa()
authorDavid Decotigny <ddecotig@gmail.com>
Fri, 20 Jan 2017 18:29:22 +0000 (10:29 -0800)
committerMichael Brown <mcb30@ipxe.org>
Sun, 22 Jan 2017 13:45:00 +0000 (13:45 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/uuid.c
src/include/ipxe/uuid.h
src/net/peerdisc.c

index b8d21de171eaa9a4045cf4e05c14b321aa4b19e3..c43d4216f80cb8d19e18493d5db09b198363ec17 100644 (file)
@@ -40,7 +40,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  * @v uuid             UUID
  * @ret string         UUID in canonical form
  */
-char * uuid_ntoa ( const union uuid *uuid ) {
+const char * uuid_ntoa ( const union uuid *uuid ) {
        static char buf[37]; /* "00000000-0000-0000-0000-000000000000" */
 
        sprintf ( buf, "%08x-%04x-%04x-%04x-%02x%02x%02x%02x%02x%02x",
index 6c45eb9aaff65b43d1defabeb88ab711ae032cd8..24c46acafd14d49d2ca90dc2fb70602ae3817e02 100644 (file)
@@ -47,6 +47,6 @@ static inline void uuid_mangle ( union uuid *uuid ) {
        __bswap_16s ( &uuid->canonical.c );
 }
 
-extern char * uuid_ntoa ( const union uuid *uuid );
+extern const char * uuid_ntoa ( const union uuid *uuid );
 
 #endif /* _IPXE_UUID_H */
index 5b0e98911aa313d07e61af495ec82fff34283e9a..4c3cd2ea5ea8bfb7bffa88bf8274464d0f696a09 100644 (file)
@@ -408,7 +408,7 @@ static struct peerdisc_segment * peerdisc_create ( const char *id ) {
        } random_uuid;
        size_t uuid_len;
        size_t id_len;
-       char *uuid;
+       const char *uuid;
        char *uuid_copy;
        char *id_copy;
        unsigned int i;