From: Yu Watanabe Date: Wed, 4 Jun 2025 09:14:02 +0000 (+0900) Subject: userdb: use RET_GATHER() at one more place and update comment X-Git-Tag: v258-rc1~396^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bfcfa17feb677dc418b1a4f0decf8c0281ab341;p=thirdparty%2Fsystemd.git userdb: use RET_GATHER() at one more place and update comment --- diff --git a/src/shared/userdb.c b/src/shared/userdb.c index 5274f87da17..a5c72cfa5da 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c @@ -605,12 +605,11 @@ static int userdb_start_query( if (is_dropin && r >= 0) iterator->dropin_covered = true; - if (ret == 0 && r < 0) - ret = r; + RET_GATHER(ret, r); } if (set_isempty(iterator->links)) - return ret < 0 ? ret : -ESRCH; /* propagate last error we saw if we couldn't connect to anything. */ + return ret < 0 ? ret : -ESRCH; /* propagate the first error we saw if we couldn't connect to anything. */ /* We connected to some services, in this case, ignore the ones we failed on */ return 0;