X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tfc_random.c;h=0a529d401b53410f08ef97d436a6fc4b578ab1f6;hb=c0d678824537239f5e17822cd8473ac32f1ed251;hp=9ef321d43304e51fbe35ce29c301d13339a64877;hpb=2a9a13e951cb7bcc4d81b3e6f1e23c5185ec77af;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)