summaryrefslogtreecommitdiff
path: root/src/libunixonacid/openwritenclose_devino_tmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libunixonacid/openwritenclose_devino_tmp.c')
-rw-r--r--src/libunixonacid/openwritenclose_devino_tmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libunixonacid/openwritenclose_devino_tmp.c b/src/libunixonacid/openwritenclose_devino_tmp.c
index 343da65..0fe032c 100644
--- a/src/libunixonacid/openwritenclose_devino_tmp.c
+++ b/src/libunixonacid/openwritenclose_devino_tmp.c
@@ -14,7 +14,7 @@ int openwritenclose_devino_tmp (char const *fn, char const *s, unsigned int len,
uint64 tmpdev, tmpino ;
unsigned int base = tmp->len ;
if (!stralloc_cats(tmp, fn)) return 0 ;
- if (random_sauniquename(tmp, 8) < 0) goto fail ;
+ if (!random_sauniquename(tmp, 8)) goto fail ;
if (!stralloc_0(tmp)) goto fail ;
if (!openwritenclose_unsafe_devino_sync(tmp->s + base, s, len, &tmpdev, &tmpino)) goto fail ;
if (rename(tmp->s + base, fn) < 0)