summaryrefslogtreecommitdiff
path: root/src/libunixonacid/dd_open_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libunixonacid/dd_open_write.c')
-rw-r--r--src/libunixonacid/dd_open_write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libunixonacid/dd_open_write.c b/src/libunixonacid/dd_open_write.c
index f579c73..90518cb 100644
--- a/src/libunixonacid/dd_open_write.c
+++ b/src/libunixonacid/dd_open_write.c
@@ -14,7 +14,7 @@ int dd_open_write (dirdescriptor_t *dd, char const *lnkfn, unsigned int mode)
dirdescriptor_t d = DIRDESCRIPTOR_ZERO ;
d.lnkfn = lnkfn ;
if (!stralloc_cats(&d.new, lnkfn)) return 0 ;
- if (random_sauniquename(&d.new, 8) < 0) goto fail ;
+ if (!random_sauniquename(&d.new, 8)) goto fail ;
if (!stralloc_0(&d.new)) goto fail ;
if (mkdir(d.new.s, mode) < 0) goto fail ;
d.fd = open_read(d.new.s) ;