Skip to content

Commit

Permalink
[build] Return const char * from uuid_ntoa()
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
DavidDecotigny authored and mcb30 committed Jan 22, 2017
1 parent fba3b39 commit 04c7bef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/uuid.c
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/include/ipxe/uuid.h
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion src/net/peerdisc.c
Expand Up @@ -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;
Expand Down

0 comments on commit 04c7bef

Please sign in to comment.