X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tfc_random.c;h=0a529d401b53410f08ef97d436a6fc4b578ab1f6;hb=ba5ce99d77078a8629779641e8506b74e50fe6af;hp=9ef321d43304e51fbe35ce29c301d13339a64877;hpb=9ac86c906f37b9b9dce4f018c90d420f947e05a9;p=tfcrypt.git diff --git a/tfc_random.c b/tfc_random.c index 9ef321d..0a529d4 100644 --- a/tfc_random.c +++ b/tfc_random.c @@ -143,8 +143,7 @@ void gen_write_bytes(const char *foutname, tfc_fsize offset, tfc_fsize nrbytes) fd = 1; foutname = TFC_STDOUT_NAME; } - else fd = open(foutname, O_WRONLY | O_CREAT | O_LARGEFILE | write_flags, 0666); - if (fd == -1) xerror(NO, NO, YES, "%s", foutname); + else fd = xopen(foutname, O_WRONLY | O_CREAT | O_LARGEFILE | write_flags); if (offset) { if (lseek(fd, offset, SEEK_SET) == -1)