author | Olivier Brunel
<jjk@jjacky.com> 2018-02-23 18:57:34 UTC |
committer | Olivier Brunel
<jjk@jjacky.com> 2018-02-23 18:59:03 UTC |
parent | 95e098e37c16610f45c32e128c81d445f75b0f83 |
src/anopa/aa-enable.c | +3 | -3 |
src/anopa/aa-status.c | +1 | -1 |
diff --git a/src/anopa/aa-enable.c b/src/anopa/aa-enable.c index 362e7c6..517fb85 100644 --- a/src/anopa/aa-enable.c +++ b/src/anopa/aa-enable.c @@ -210,9 +210,9 @@ copy_file (const char *src, const char *dst) if (*src != '/') { - if (!stralloc_cats (&sa_pl, "/")) - aa_strerr_diefu1sys (RC_FATAL_MEMORY, "stralloc_cats"); - if (!stralloc_cats (&sa_pl, src)) + if (!stralloc_cats (&sa_pl, "/") + || !stralloc_cats (&sa_pl, src) + || !stralloc_0 (&sa_pl)) aa_strerr_diefu1sys (RC_FATAL_MEMORY, "stralloc_cats"); src = sa_pl.s; } diff --git a/src/anopa/aa-status.c b/src/anopa/aa-status.c index 395a6b5..d6bdfff 100644 --- a/src/anopa/aa-status.c +++ b/src/anopa/aa-status.c @@ -955,7 +955,7 @@ main (int argc, char * const argv[]) if (all) { sacwd.len = 0; - stralloc_cats (&sacwd, "."); + stralloc_catb (&sacwd, ".", 2); r = aa_scan_dir (&sacwd, 0, it_all, &cfg); if (r < 0) aa_strerr_diefu2sys (RC_FATAL_IO, "scan repo directory ", path_repo);