X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fnss-mymachines%2Fnss-mymachines.c;h=cc185b0c3df96f5d585b35d0466ea6c7135bbdd5;hb=e70df46b9721a3d025e7a0b4ffb5893cbde5e55d;hp=985ebb7134b4fa43d32b2b6ed3ebe78869846e27;hpb=0dd25fb9f005d8ab7ac4bc10a609d00569f8c56a;p=elogind.git diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c index 985ebb713..cc185b0c3 100644 --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c @@ -205,6 +205,11 @@ enum nss_status _nss_mymachines_gethostbyname4_r( if (ttlp) *ttlp = 0; + /* Explicitly reset all error variables */ + *errnop = 0; + *h_errnop = NETDB_SUCCESS; + h_errno = 0; + return NSS_STATUS_SUCCESS; fail: @@ -365,6 +370,11 @@ enum nss_status _nss_mymachines_gethostbyname3_r( if (canonp) *canonp = r_name; + /* Explicitly reset all error variables */ + *errnop = 0; + *h_errnop = NETDB_SUCCESS; + h_errno = 0; + return NSS_STATUS_SUCCESS; fail: