void **.
* nss/nsswitch.h (service_user): Use void * type for KNOWN field.
* nss/nss_files/files-hosts.c (LINE_PARSER): Cast host_addr to
char * to avoid warning.
* nis/nss_nis/nis-hosts.c (LINE_PARSER): Likewise.
* timezone/Makefile (CFLAGS-zdump.c): Add -fwrapv.
* locale/programs/ld-ctype.c (ctype_finish, set_class_defaults,
allocate_arrays): Cast second argument to charmap_find_symbol
to char * to avoid warnings.
* locale/programs/repertoire.c (repertoire_new_char): Change
from_nr, to_nr and cnt to unsigned long, adjust printf format
string.
* locale/programs/ld-collate.c (insert_value, handle_ellipsis):
Cast second argument to new_element to char * to avoid warnings.
* locale/weightwc.h (findidx): Cast &extra[-i] to const int32_t *.
* intl/gettextP.h (struct loaded_domain): Change plural to const
struct expression *.
* intl/plural-eval.c (plural_eval): Change first argument to
const struct expression *.
* intl/plural-exp.c (EXTRACT_PLURAL_EXPRESSION): Change first
argument to const struct expression **.
* intl/plural-exp.h (EXTRACT_PLURAL_EXPRESSION, plural_eval): Adjust
prototypes.
* intl/loadmsgcat (_nl_unload_domain): Cast away const
in call to __gettext_free_exp.
* posix/fnmatch.c (fnmatch): Rearrange code to avoid maybe
unitialized wstring/wpattern var warnings.
* posix/runtests.c (struct a_test): Make data field const char *.
* stdio-common/tst-sprintf2.c (main): Don't declere u, v and buf
vars if not LDBL_MANT_DIG >= 106.
* stdio-common/Makefile (CFLAGS-vfwprintf.c): Add -Wno-unitialized.
* stdio-common/vfprintf.c (vfprintf): Cast first arugment to
__find_specmb to avoid warning.
* rt/tst-mqueue1.c (do_one_test): Add casts to avoid warnings.
* debug/test-strcpy_chk.c (do_tests, do_random_tests): Add casts
to avoid warnings.
* sysdeps/ieee754/ldbl-96/s_roundl.c (huge): Add L suffix to
initializer.
* sysdeps/unix/clock_gettime.c (clock_gettime): Only define
tv var when it will be actually used.
* sunrpc/rpc_cmsg.c (xdr_callmsg): Cast IXDR_PUT_* to void
to avoid warnings.
was allocated here. [Coverity CID 219]
* posix/getconf.c (print_all): Free confstr data after printing.
[Coverity CID 218]
* sysdeps/posix/getaddrinfo.c (gaih_inet): Free canon string if
list allocation fails. [Coverity CID 215]
* nss/nsswitch.c (__nss_configure_lookup): Fix loop end condition.
[Coverity CID 213]
* argp/argp-help.c (hol_entry_cmp): Don't call canon_doc_option if
string is NULL. [Coverity CID 212]
* argp/Makefile: Add rules to build and run bug-argp1.
* argp/bug-argp1.c: New file.
* io/ftw.c (ftw_dir): Use __rawmemchr instead of strchr to find
end of string.
* stdlib/canonicalize.c (__realpath): Likewise.
* locale/programs/ld-time.c (time_finish): Don't dereference NULL
pointer. [Coverity CID 206]
* elf/dl-dst.h (DL_DST_REQUIRED): Be prepared for missing link map
in statically linked code.
* elf/dl-load.c (_dl_dst_substitute): When replacing ORIGIN in
statically built code, be prepared to have no link map.
[Coverity CID 205]
* argp/argp-help.c (fill_in_uparams): Handle STATE==NULL in
dgettext calls. [Coverity CID 204]
* argp/argp-help.c (struct uparams): Remove valid member. Change
the one user.
(uparam_names): Reduce size. Avoid relative relocations.
Moved to read-only segment.
(fill_in_uparams): Update for new layout.
* sysdeps/unix/sysv/linux/ifaddrs.c (getifaddrs): Parameter can be
assumed to always be != NULL. [Coverity CID 202]
* argp/argp-help.c (hol_entry_help): Remove some dead code
[Coverity CID 200].
* nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Optimize
away a few more unconditional yperr2nss calls.
(_nss_nis_getservbyname_r): Likewise.
invalid length [Coverity CID 106].
* nss/nss_files/files-key.c (search): Close stream before
successful return [Coverity CID 107].
* io/fts.c (fts_open): Don't allocate parent if *argv==NULL
[Coverity CID 108].
* sunrpc/rpc_cout.c (inline_struct): Free sizestr after use
[Coverity CID 110, 109].
* sunrpc/rpc_scan.c (docppline): Free file string if it is not
going to be used [Coverity CID 111].
* sysdeps/unix/sysv/linux/getsourcefilter.c (getsourcefilter): Free
memory if socket level value cannot be retrieved [Coverity CID 112].
* nis/nis_clone_dir.c (nis_clone_directory): Free all memory in
error case [Coverity CID 114].
* nis/nis_clone_res.c (nis_clone_result): Free all memory in the
error cases [Coverity CID 115].
* sunrpc/rpc_parse.c (get_definition): Free defp if tok ==
TOK_EOF [Coverity CID 116].
* sysdeps/unix/sysv/linux/setsourcefilter.c (setsourcefilter): Free
memory if socket level value cannot be retrieved [Coverity CID 117].
* elf/cache.c (save_cache): Initialize pad to avoid writing
uninitialized data to disk.
* elf/cache.c (save_cache): Free file_entries_new [Coverity CID 118].
* intl/finddomain.c (_nl_find_domain): Avoid strdup of expand
locale name, use strdupa. Remove free call [Coverity CID 119].
* sunrpc/rpc_main.c (generate_guard): Avoid extra allocation and
the resulting leak [Coverity CID 121].
* sunrpc/rpc_main.c (mkfile_output): Free all allocated memory
[Coverity CID 122].
* sunrpc/rpc_main.c (h_output): Free guard after we are done
[Coverity CID 123].
* sunrpc/svc_udp.c (cache_set): Free victim if newbuf allocation
fails [Coverity CID 126].
* sunrpc/svc_udp.c (svcudp_enablecache): Free memory in error
cases [Coverity CID 127].
* nis/nis_table.c (__create_ib_request): Free ibreq in case strdup
fails [Coverity CID 128].
* nis/nis_getservlist.c (nis_getservlist): Free all memory in case
of an error [Coverity CID 130, 129].
* nis/nis_print_group_entry.c (nis_print_group_entry): If
nis_lookup call failed, return. Free lookup result in error
cases [Coverity CID 131].
* nis/nis_removemember.c (nis_removemember): Free all memory in
error cases [Coverity CID 132].
* nis/nss_nisplus/nisplus-alias.c (_nss_nisplus_getaliasbyname_r):
Always free lookup result [Coverity CID 134].
* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_gethostton_r):
Always free lookup result [Coverity CID 135].
* nis/nss_nisplus/nisplus-ethers.c (_nss_nisplus_getntohost_r):
Always free lookup result [Coverity CID 136].
* nis/nss_nisplus/nisplus-network.c (_nss_nisplus_getnetbyaddr_r):
Before retrying, free old result [Coverity CID 137].
* nis/nss_nisplus/nisplus-publickey.c (_nss_nisplus_netname2user):
Free res in case UID is zero [Coverity CID 138].
* nis/ypclnt.c (yp_update): Always free master string
[Coverity CID 140].
* nis/nis_creategroup.c (nis_creategroup): Free all memory in
error cases [Coverity CID 143, 142, 141].
* nis/nss_nis/nis-publickey.c (_nss_nis_getpublickey): Free result
if yp_match call succeeded [Coverity CID 155].
* nis/nss_nis/nis-publickey.c (_nss_nis_getsecretkey): Free string
allocated in yp_match at all times [Coverity CID 157, 156].
* nscd/nscd.c (write_pid): Close stream also if writing failed
[Coverity CID 165].
* nis/nis_table.c (nis_add_entry): Move test for NULL parameter
ahead of first use [Coverity CID 167].
* nis/nss_nis/nis-alias.c (_nss_nis_getaliasbyname_r): Move test
for NULL parameter ahead of first use [Coverity CID 168].
* intl/finddomain.c (_nl_find_domain): We never return NULL if we
found the locale [Coverity CID 169].
* inet/getnameinfo.c (getnameinfo): __getservbyport_r does not set
herrno [Coverity CID 178].
* nis/nis_checkpoint.c (nis_checkpoint): Don't access and returned
freed object [Coverity CID 182].
(setup): Remove FUNC_NAME and ALL arguments, assume they are always
"setnetgrent" and 1.
(endnetgrent_hook): New function.
(internal_endnetgrent): Use it.
(__internal_setnetgrent_reuse): Use it. Adjust setup caller.
If status is NSS_STATUS_SUCCESS, yet action is continue, call
endnetgrent hook.
(internal_getnetgrent_r): Use __nss_lookup_function rather than
setup. Recompute getfct pointer after successful
__internal_setnetgrent_reuse. Don't use __nss_next.
(innetgr): Use __nss_lookup_function instead of __nss_lookup.
Adjust setup caller.
* nss/nss_files/files-netgrp.c (_nss_files_endnetgrent): Always clear
data_size and cursor. Add libnss_files_hidden_proto and
libnss_files_hidden_def.
(_nss_files_setnetgrent): Call _nss_files_endnetgrent on failure.
* nis/nss_nis/nis-netgrp.c (internal_endnetgrent): Always clear
data_size and cursor.
(_nss_nis_setnetgrent): Don't call internal_endnetgrent.
(_nss_nis_getnetgrent_r): Remove result->cursor == NULL handling.
* nis/nss_nisplus/nisplus-netgrp.c (internal_endnetgrent): Always clear
data_size and position.
(_nss_nisplus_setnetgrent): Don't call internal_endnetgrent.
2005-09-09 Ulrich Drepper <drepper@redhat.com>
* nss/getent.c (netgroup_keys): Call endnetgrent.
(main): Call mtrace.
* nss/nss_files/files-netgrp.c (_nss_files_setnetgrent): We don't
need locking for the stream. Use feof_unlocked.
2005-09-09 Jakub Jelinek <jakub@redhat.com>
2005-08-10 Sergio Gelato <Sergio.Gelato@astro.su.se>
[BZ #1188]
* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Change assert check
from (len > 0) to (len >= 0).
2005-08-16 Ulrich Drepper <drepper@redhat.com>
* nis/nis_xdr.c (_xdr_nis_result): Fix type of res variable.
Reported by Thomas Schwinge.
2005-08-15 Jakub Jelinek <jakub@redhat.com>
* nis/nis_subr.c (nis_leaf_of_r): Handle buflen == 0 correctly.
2005-08-16 Ulrich Drepper <drepper@redhat.com>
* nss/getent.c (more_help): Use open_memstream instead of handling
memory allocation ourselves.
2005-08-16 Jay Fenlason <fenlason@redhat.com>
* nss/getent.c (parse_options): change the -s option to support
{database}:{search} to override /etc/resolv.conf for only the
specified database.
2004-11-23 Jakub Jelinek <jakub@redhat.com>
* nss/nss_files/files-XXX.c (internal_getent): If parse_line returned
-1, also do H_ERRNO_SET (NETDB_INTERNAL).
2004-10-24 Ulrich Drepper <drepper@redhat.com>
* include/libc-symbols.h: Define hidden attribute macros for
libnss_files.
* include/netdb.h: Use libnss_files_hidden_proto for the parsers
defined in libnss_files, not libc_hidden_proto.
* include/netinet/ether.h: Likewise.
* include/rpc/netdb.h: Likewise.
* nss/nss_files/files-parse.c: Use hidden_def in parser definitions
instead of libc_hidden_def.
* nss/nss_files/files-netgrp.c: Add libnss_files_hidden_def to
_nss_netgroup_parseline definition.
2004-09-12 Ulrich Drepper <drepper@redhat.com>
* nss/getent.c: Don't preconstruct help message. Do it only when
needed.
* locale/programs/locale.c: Simplify help message printing.
2004-07-30 Guido Guenther <agx@sigxcpu.org>
* nss/getent.c (passwd_keys): Use strtoul instead of isdigit to
test if the key is numeric or not.
(group_keys): Likewise.
2004-06-14 Jakub Jelinek <jakub@redhat.com>
[BZ #219]
* nss/nsswitch.c (free_mem): Don't try to close a library handle
if the handle is invalid. Patch by David Kimdon <kimdon@esrf.fr>.
2004-06-11 Dmitry V. Levin <ldv@altlinux.org>
[BZ #217]
* debug/xtrace.sh: Fix typo in error diagnostics.
2004-05-26 Jakub Jelinek <jakub@redhat.com>
* include/string.h (mempcpy, stpcpy): Add libc_hidden_builtin_proto.
* string/bits/string2.h (memset): Disable macro for GCC 3.0+.
(__mempcpy): Use __builtin_mempcpy for GCC 3.4+.
(strchr): For GCC 3.2+, only use __rawmemchr if second argument is
constant '\0' and first argument is not constant.
(__stpcpy): Use __builtin_stpcpy for GCC 3.4+.
(strncpy): Remove #ifdef _USE_STRING_ARCH_mempcpy variant.
For GCC 3.2+ use __builtin_strncpy.
(strncat): For GCC 3.2+ use __builtin_strncat.
(strcmp): For GCC 3.2+ use __builtin_strcmp if both arguments are
constant.
(strcspn, strspn, strpbrk): For GCC 3.2+, use builtin function
if both arguments are constant.
2004-05-26 Ulrich Drepper <drepper@redhat.com>
* nss/nss_files/files-hosts.c: Fix condition for looking up IPv4
mapped addresses in gethostbyaddr.
2004-05-25 Ulrich Drepper <drepper@redhat.com>
* nss/digits_dots.c (__nss_hostname_digits_dots): Remove typep and
flags parameter, convert afp to simple int parameter. Adjust code.
typep was never != NULL and flags therefore also unused. *afp is
never modified.
* nss/nsswitch.h: Adjust __nss_hostname_digits_dots prototype.
* nss/getXXbyYY.c: Remove HAVE_TYPE handling. Adjust af parameter
handling for __nss_hostname_digits_dots calls.
* nss/getXXbyYY_r.c: Likewise.
* elf/dl-load.c (_dl_map_object_from_fd): Map DSOs with MAP_DENYWRITE.
* sysdeps/unix/sysv/linux/ifreq.c (__ifreq): Fix memory handling.
* sysdeps/generic/ifreq.c (__ifreq): Fix memory handling.
* resolv/res_hconf.c (_res_hconf_reorder_addrs): Make clear that
realloc cannot fail.
* nss/nss_files/files-netgrp.c (EXPAND): Free buffer which cannot
be expanded.
* nis/nis_table.c: Clean up memory handling.
* nis/nis_subr.c (nis_getnames): Clean up memory handling.
* nis/nis_removemember.c (nis_removemember): Add comment
explaining use of realloc.
2004-03-30 Jakub Jelinek <jakub@redhat.com>
* nis/nss_nis/nis-service.c (_nss_nis_getservbyname_r): If protocol
== NULL, try name/tcp and name/udp first before falling back into
the sequential scanning. Use services.byname database for
sequential scanning.
(_nss_nis_getservbyport_r): Likewise. Just allocate sizeof (int) * 3
chars for integer.
* nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Convert
proto to host by order for snprintf.
* nss/getent.c (services_keys): Don't implement lookups with
missing protocol using getservent loop, just pass NULL.
2004-02-26 Ulrich Drepper <drepper@redhat.com>
* nss/getXXbyYY_r.c: Pass result also to the nscd_* function. Don't
set *result here.
* nscd/nscd_proto.h: Add new argument for pointer to result pointer
to all nscd_* functions.
* nscd/nscd_getgr_r.c (nscd_getgr_r): Add new parameter. Store result
pointer in the address provided by the new parameter if successful.
Otherwise store NULL. Return zero if no entry found.
(__nscd_getgrnam_r, __nscd_getgrgid_r): Add new parameter and pass
it on.
* nscd/nscd_gethst_r.c (nscd_gethst_r): Add new parameter. Store
result pointer in the address provided by the new parameter if
successful. Otherwise store NULL. Return zero if no entry found.
(__nscd_gethostbyname_r, __nscd_gethostbyname2_r,
__nscd_gethostbyaddr_r): Add new parameter and pass it on.
* nscd/nscd_getpw_r.c (nscd_getpw_r): Add new parameter. Store result
pointer in the address provided by the new parameter if successful.
Otherwise store NULL. Return zero if no entry found.
(__nscd_getpwnam_r, __nscd_getpwuid_r): Add new parameter and pass
it on.
2003-09-04 Ulrich Drepper <drepper@redhat.com>
* nss/getXXbyYY.c (FUNCTION_NAME): Add a few casts. Remove
unnecessary errno handling.
* nss/getXXbyYY_r.c (INTERNAL): Use better variable name.
Initialize it in all cases. Change it to be a bit more like the
code we had before.
2003-09-03 Ulrich Drepper <drepper@redhat.com>
* nss/getXXbyYY_r.c (INTERNAL): Explicitly set errno and avoid
returning ERANGE if this wasn't intended.