1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-28 11:57:28 +00:00

Constify arguments.

This commit is contained in:
Marcel Moolenaar 2005-01-03 02:56:15 +00:00
parent 483e82b86c
commit 1d1b40fed8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139601
6 changed files with 17 additions and 17 deletions

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2002 Marcel Moolenaar
* Copyright (c) 2002,2005 Marcel Moolenaar
* Copyright (c) 2002 Hiten Mahesh Pandya
* All rights reserved.
*
@ -46,14 +46,14 @@
#define uuid_s_no_memory 3
__BEGIN_DECLS
int32_t uuid_compare(uuid_t *, uuid_t *, uint32_t *);
int32_t uuid_compare(const uuid_t *, const uuid_t *, uint32_t *);
void uuid_create(uuid_t *, uint32_t *);
void uuid_create_nil(uuid_t *, uint32_t *);
int32_t uuid_equal(uuid_t *, uuid_t *, uint32_t *);
int32_t uuid_equal(const uuid_t *, const uuid_t *, uint32_t *);
void uuid_from_string(const char *, uuid_t *, uint32_t *);
uint16_t uuid_hash(uuid_t *, uint32_t *);
int32_t uuid_is_nil(uuid_t *, uint32_t *);
void uuid_to_string(uuid_t *, char **, uint32_t *);
uint16_t uuid_hash(const uuid_t *, uint32_t *);
int32_t uuid_is_nil(const uuid_t *, uint32_t *);
void uuid_to_string(const uuid_t *, char **, uint32_t *);
__END_DECLS
#endif /* _UUID_H_ */

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2002 Marcel Moolenaar
* Copyright (c) 2002,2005 Marcel Moolenaar
* Copyright (c) 2002 Hiten Mahesh Pandya
* All rights reserved.
*
@ -39,7 +39,7 @@
* than any non-nil UUID.
*/
int32_t
uuid_compare(uuid_t *a, uuid_t *b, uint32_t *status)
uuid_compare(const uuid_t *a, const uuid_t *b, uint32_t *status)
{
int res;

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2002 Marcel Moolenaar
* Copyright (c) 2002,2005 Marcel Moolenaar
* Copyright (c) 2002 Hiten Mahesh Pandya
* All rights reserved.
*
@ -36,7 +36,7 @@
* http://www.opengroup.org/onlinepubs/009629399/uuid_equal.htm
*/
int32_t
uuid_equal(uuid_t *a, uuid_t *b, uint32_t *status)
uuid_equal(const uuid_t *a, const uuid_t *b, uint32_t *status)
{
if (status != NULL)

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2002 Marcel Moolenaar
* Copyright (c) 2002,2005 Marcel Moolenaar
* Copyright (c) 2002 Hiten Mahesh Pandya
* All rights reserved.
*
@ -35,7 +35,7 @@
* http://www.opengroup.org/onlinepubs/009629399/uuid_hash.htm
*/
uint16_t
uuid_hash(uuid_t *u, uint32_t *status)
uuid_hash(const uuid_t *u, uint32_t *status)
{
if (status)

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2002 Marcel Moolenaar
* Copyright (c) 2002,2005 Marcel Moolenaar
* Copyright (c) 2002 Hiten Mahesh Pandya
* All rights reserved.
*
@ -35,7 +35,7 @@
* http://www.opengroup.org/onlinepubs/009629399/uuid_is_nil.htm
*/
int32_t
uuid_is_nil(uuid_t *u, uint32_t *status)
uuid_is_nil(const uuid_t *u, uint32_t *status)
{
uint32_t *p;

View File

@ -1,5 +1,5 @@
/*-
* Copyright (c) 2002 Marcel Moolenaar
* Copyright (c) 2002,2005 Marcel Moolenaar
* Copyright (c) 2002 Hiten Mahesh Pandya
* All rights reserved.
*
@ -41,7 +41,7 @@
* taken from the Hewlett-Packard implementation.
*/
void
uuid_to_string(uuid_t *u, char **s, uint32_t *status)
uuid_to_string(const uuid_t *u, char **s, uint32_t *status)
{
uuid_t nil;
@ -54,7 +54,7 @@ uuid_to_string(uuid_t *u, char **s, uint32_t *status)
if (u == NULL) {
u = &nil;
uuid_create_nil(u, NULL);
uuid_create_nil(&nil, NULL);
}
asprintf(s, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",