Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
uuid: don't terminate app on an error
  • Loading branch information
perexg committed Aug 29, 2014
1 parent 4ce05e5 commit 2746998
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uuid.c
Expand Up @@ -109,12 +109,12 @@ uuid_init_bin ( tvh_uuid_t *u, const char *str )
if (str) {
if (strlen(str) != UUID_HEX_SIZE - 1) {
tvherror("uuid", "wrong uuid size");
exit(1);
return -EINVAL;
}
return hex2bin(u->bin, sizeof(u->bin), str);
} else if (read(fd, u->bin, sizeof(u->bin)) != sizeof(u->bin)) {
tvherror("uuid", "failed to read from %s", RANDOM_PATH);
exit(1);
return -EINVAL;
}
return 0;
}
Expand Down

0 comments on commit 2746998

Please sign in to comment.