diff options
Diffstat (limited to 'freebsd/lib/libc/net')
-rw-r--r-- | freebsd/lib/libc/net/gethostbydns.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/gethostbyht.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/getnetbydns.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/getnetbyht.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/getproto.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/getprotoent.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/getprotoname.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/getservent.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/linkaddr.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/map_v4v6.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/nsdispatch.c | 34 | ||||
-rw-r--r-- | freebsd/lib/libc/net/rcmd.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/recv.c | 2 | ||||
-rw-r--r-- | freebsd/lib/libc/net/send.c | 2 |
14 files changed, 29 insertions, 31 deletions
diff --git a/freebsd/lib/libc/net/gethostbydns.c b/freebsd/lib/libc/net/gethostbydns.c index bae4d166..40671c45 100644 --- a/freebsd/lib/libc/net/gethostbydns.c +++ b/freebsd/lib/libc/net/gethostbydns.c @@ -14,7 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/gethostbyht.c b/freebsd/lib/libc/net/gethostbyht.c index 80a66922..a5c0fc0a 100644 --- a/freebsd/lib/libc/net/gethostbyht.c +++ b/freebsd/lib/libc/net/gethostbyht.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/getnetbydns.c b/freebsd/lib/libc/net/getnetbydns.c index 1e0cc3d1..226956d1 100644 --- a/freebsd/lib/libc/net/getnetbydns.c +++ b/freebsd/lib/libc/net/getnetbydns.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/getnetbyht.c b/freebsd/lib/libc/net/getnetbyht.c index ee80bab0..71a2d1d6 100644 --- a/freebsd/lib/libc/net/getnetbyht.c +++ b/freebsd/lib/libc/net/getnetbyht.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/getproto.c b/freebsd/lib/libc/net/getproto.c index 5f9950ae..2817fb8f 100644 --- a/freebsd/lib/libc/net/getproto.c +++ b/freebsd/lib/libc/net/getproto.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/getprotoent.c b/freebsd/lib/libc/net/getprotoent.c index 774ae95a..a45f74f0 100644 --- a/freebsd/lib/libc/net/getprotoent.c +++ b/freebsd/lib/libc/net/getprotoent.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/getprotoname.c b/freebsd/lib/libc/net/getprotoname.c index 16c1ac43..e798e991 100644 --- a/freebsd/lib/libc/net/getprotoname.c +++ b/freebsd/lib/libc/net/getprotoname.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/getservent.c b/freebsd/lib/libc/net/getservent.c index 63aba518..ccdad343 100644 --- a/freebsd/lib/libc/net/getservent.c +++ b/freebsd/lib/libc/net/getservent.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/linkaddr.c b/freebsd/lib/libc/net/linkaddr.c index dbd363d8..97870019 100644 --- a/freebsd/lib/libc/net/linkaddr.c +++ b/freebsd/lib/libc/net/linkaddr.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/map_v4v6.c b/freebsd/lib/libc/net/map_v4v6.c index 2923fb48..a2f0a1dd 100644 --- a/freebsd/lib/libc/net/map_v4v6.c +++ b/freebsd/lib/libc/net/map_v4v6.c @@ -14,7 +14,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/nsdispatch.c b/freebsd/lib/libc/net/nsdispatch.c index 8d0e1493..2e241740 100644 --- a/freebsd/lib/libc/net/nsdispatch.c +++ b/freebsd/lib/libc/net/nsdispatch.c @@ -225,7 +225,7 @@ vector_append(const void *elem, void *vec, unsigned int *count, size_t esize) void *p; if ((*count % ELEMSPERCHUNK) == 0) { - p = realloc(vec, (*count + ELEMSPERCHUNK) * esize); + p = reallocarray(vec, *count + ELEMSPERCHUNK, esize); if (p == NULL) { nss_log_simple(LOG_ERR, "memory allocation failure"); return (vec); @@ -365,20 +365,20 @@ nss_configure(void) path = getenv("NSSWITCH_CONF"); if (path == NULL) #endif - path = _PATH_NS_CONF; + path = _PATH_NS_CONF; if (stat(path, &statbuf) != 0) return (0); if (statbuf.st_mtime <= confmod) return (0); if (isthreaded) { - (void)_pthread_rwlock_unlock(&nss_lock); - result = _pthread_rwlock_wrlock(&nss_lock); - if (result != 0) - return (result); - if (stat(path, &statbuf) != 0) - goto fin; - if (statbuf.st_mtime <= confmod) - goto fin; + (void)_pthread_rwlock_unlock(&nss_lock); + result = _pthread_rwlock_wrlock(&nss_lock); + if (result != 0) + return (result); + if (stat(path, &statbuf) != 0) + goto fin; + if (statbuf.st_mtime <= confmod) + goto fin; } _nsyyin = fopen(path, "re"); if (_nsyyin == NULL) @@ -388,30 +388,28 @@ nss_configure(void) #ifndef __rtems__ VECTOR_FREE(_nsmod, &_nsmodsize, sizeof(*_nsmod), (vector_free_elem)ns_mod_free); + if (confmod == 0) + (void)atexit(nss_atexit); nss_load_builtin_modules(); #endif /* __rtems__ */ _nsyyparse(); (void)fclose(_nsyyin); vector_sort(_nsmap, _nsmapsize, sizeof(*_nsmap), string_compare); -#ifndef __rtems__ - if (confmod == 0) - (void)atexit(nss_atexit); -#endif /* __rtems__ */ confmod = statbuf.st_mtime; #ifdef NS_CACHING handle = libc_dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (handle != NULL) { nss_cache_cycle_prevention_func = dlsym(handle, - "_nss_cache_cycle_prevention_function"); + "_nss_cache_cycle_prevention_function"); dlclose(handle); } #endif fin: if (isthreaded) { - (void)_pthread_rwlock_unlock(&nss_lock); - if (result == 0) - result = _pthread_rwlock_rdlock(&nss_lock); + (void)_pthread_rwlock_unlock(&nss_lock); + if (result == 0) + result = _pthread_rwlock_rdlock(&nss_lock); } return (result); } diff --git a/freebsd/lib/libc/net/rcmd.c b/freebsd/lib/libc/net/rcmd.c index 8458a34c..12811b17 100644 --- a/freebsd/lib/libc/net/rcmd.c +++ b/freebsd/lib/libc/net/rcmd.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/recv.c b/freebsd/lib/libc/net/recv.c index 71c531c8..4d3fc004 100644 --- a/freebsd/lib/libc/net/recv.c +++ b/freebsd/lib/libc/net/recv.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/freebsd/lib/libc/net/send.c b/freebsd/lib/libc/net/send.c index 332f850d..6b71fa95 100644 --- a/freebsd/lib/libc/net/send.c +++ b/freebsd/lib/libc/net/send.c @@ -12,7 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * |