mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 14:55:12 +00:00
sudo_uuid_to_string_v1's first argument should be const
uuid is not modified.
This commit is contained in:
@@ -352,7 +352,7 @@ sudo_dso_public void sudo_get_ttysize_v2(int fd, int *rowp, int *colp);
|
|||||||
/* uuid.c */
|
/* uuid.c */
|
||||||
sudo_dso_public void sudo_uuid_create_v1(unsigned char uuid_out[16]);
|
sudo_dso_public void sudo_uuid_create_v1(unsigned char uuid_out[16]);
|
||||||
#define sudo_uuid_create(_a) sudo_uuid_create_v1((_a))
|
#define sudo_uuid_create(_a) sudo_uuid_create_v1((_a))
|
||||||
sudo_dso_public char *sudo_uuid_to_string_v1(unsigned char uuid[16], char *dst, size_t dstsiz);
|
sudo_dso_public char *sudo_uuid_to_string_v1(const unsigned char uuid[16], char *dst, size_t dstsiz);
|
||||||
#define sudo_uuid_to_string(_a, _b, _c) sudo_uuid_to_string_v1((_a), (_b), (_c))
|
#define sudo_uuid_to_string(_a, _b, _c) sudo_uuid_to_string_v1((_a), (_b), (_c))
|
||||||
|
|
||||||
#endif /* SUDO_UTIL_H */
|
#endif /* SUDO_UTIL_H */
|
||||||
|
@@ -71,7 +71,7 @@ sudo_uuid_create_v1(unsigned char uuid_out[16])
|
|||||||
* Format a uuid as a 36-byte string (plus one for the NUL).
|
* Format a uuid as a 36-byte string (plus one for the NUL).
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
sudo_uuid_to_string_v1(unsigned char uuid[16], char *dst, size_t dstsiz)
|
sudo_uuid_to_string_v1(const unsigned char uuid[16], char *dst, size_t dstsiz)
|
||||||
{
|
{
|
||||||
const char hex[] = "0123456789abcdef";
|
const char hex[] = "0123456789abcdef";
|
||||||
char *cp = dst;
|
char *cp = dst;
|
||||||
|
Reference in New Issue
Block a user