mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
o silly bugs
This commit is contained in:
parent
8a14dc290a
commit
0803634cd1
@ -61,7 +61,6 @@ void _build_inverse(void)
|
||||
int id_valid(struct id *id)
|
||||
{
|
||||
int i;
|
||||
char lookup[256];
|
||||
|
||||
_build_inverse();
|
||||
|
||||
@ -89,7 +88,7 @@ int id_format(struct id *id, char *buffer, size_t size)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < GROUPS; i++) {
|
||||
memcpy(buffer + (i * 5), id.uuid + (i * 4), 4);
|
||||
memcpy(buffer + (i * 5), id->uuid + (i * 4), 4);
|
||||
buffer[(i * 5) + 4] = '-';
|
||||
}
|
||||
|
||||
@ -99,6 +98,8 @@ int id_format(struct id *id, char *buffer, size_t size)
|
||||
|
||||
int id_read_format(struct id *id, char *buffer)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (strlen(buffer) < (GROUPS * 5)) {
|
||||
log_err("Insufficient characters to be a proper uuid.");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user