summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-10-14 13:46:35 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-10-14 13:46:35 +0000
commit9308bc100681fdb0fd87c0536c1c8fcb266c53e9 (patch)
tree24326fe743e51582389b3f37a12ba0a59521212b
parent697eaf05dc9ed8c6a10be7f404078c4c60ddf108 (diff)
downloads6-rc-9308bc100681fdb0fd87c0536c1c8fcb266c53e9.tar.xz
bugfix: random_sauniquename API in s6-rc-update
-rw-r--r--src/s6-rc/s6-rc-update.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/s6-rc/s6-rc-update.c b/src/s6-rc/s6-rc-update.c
index da56250..a43d165 100644
--- a/src/s6-rc/s6-rc-update.c
+++ b/src/s6-rc/s6-rc-update.c
@@ -334,7 +334,7 @@ static inline void make_new_livedir (unsigned char const *oldstate, s6rc_db_t co
if (sareadlink(&satmp, live) < 0) strerr_diefu2sys(111, "readlink ", live) ;
if (!s6rc_sanitize_dir(sa, live, &dirlen)) dienomem() ;
llen = sa->len ;
- if (!random_sauniquename(sa, 8) || !stralloc_0(sa)) dienomem() ;
+ if (random_sauniquename(sa, 8) < 0 || !stralloc_0(sa)) dienomem() ;
newlen = --sa->len ;
if (mkdir(sa->s + sabase, 0755) < 0) strerr_diefu2sys(111, "mkdir ", sa->s + sabase) ;
{