From 7df8376ba885bb87e4e84a8489bdf0f97accf4cf Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Wed, 2 Sep 2015 17:16:29 +0000 Subject: and another one... --- src/s6-rc/s6-rc-bundle.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/s6-rc/s6-rc-bundle.c b/src/s6-rc/s6-rc-bundle.c index d00f7dd..75c3ac1 100644 --- a/src/s6-rc/s6-rc-bundle.c +++ b/src/s6-rc/s6-rc-bundle.c @@ -62,7 +62,7 @@ static void check (cdb_t *cr, s6rc_db_t *db, char const *name, int h, int force, return ; } if (h && !force) - strerr_dief4x(1, "identifier ", name, " exists in database ", compiled) ; + strerr_dief4x(1, "identifier ", name, " already exists in database ", compiled) ; if (cdb_datalen(cr) == 4) { uint32 x ; @@ -119,7 +119,9 @@ static void modify_resolve (int fdcompiled, s6rc_db_t *db, char const *const *to strerr_diefu3sys(111, "cdb_read ", compiled, "/resolve.cdb") ; } for (i = 0 ; i < todeln ; i++) if (!str_diffn(todel[i], ktmp, klen)) break ; - if (i >= todeln) + if (i < todeln) continue ; + for (i = 0 ; i < toaddn ; i++) if (!str_diffn(toadd[i], ktmp, klen)) break ; + if (i < toaddn) continue ; { unsigned int dlen = cdb_datalen(&cr) ; char dtmp[dlen + 1] ; -- cgit v1.2.3