diff options
Diffstat (limited to 'src/libstddjb')
-rw-r--r-- | src/libstddjb/sauniquename.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstddjb/sauniquename.c b/src/libstddjb/sauniquename.c index 5a6ad83..ddf47ec 100644 --- a/src/libstddjb/sauniquename.c +++ b/src/libstddjb/sauniquename.c @@ -12,7 +12,7 @@ int sauniquename (stralloc *sa) unsigned int base = sa->len ; int wasnull = !sa->s ; - if (!stralloc_readyplus(sa, TIMESTAMP + UINT_FMT + 131)) return -1 ; + if (!stralloc_readyplus(sa, TIMESTAMP + UINT_FMT + 131)) return 0 ; sa->s[base] = ':' ; timestamp(sa->s + base + 1) ; sa->s[base + 1 + TIMESTAMP] = ':' ; @@ -20,9 +20,9 @@ int sauniquename (stralloc *sa) sa->len += uint_fmt(sa->s + sa->len, getpid()) ; sa->s[sa->len++] = ':' ; if (sagethostname(sa) == -1) goto err ; - return 0 ; + return 1 ; err: if (wasnull) stralloc_free(sa) ; else sa->len = base ; - return -1 ; + return 0 ; } |