1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Convert a few more function definitions to prototype style.

This patch converts a few more function definitions in glibc from
old-style K&R to prototype style.  This is sufficient to build and
test on x86_64 and x86 with -Wold-style-definition (I'll test on some
more architectures before proposing the actual addition of
-Wold-style-definition).

Tested for x86_64 and x86 with -Wold-style-definition in use
(testsuite - this patch affects files containing assertions).

	* io/fts.c (fts_open): Convert to prototype-style function
	definition.
	* malloc/mcheck.c (mcheck): Likewise.
	(mcheck_pedantic): Likewise.
	* posix/regexec.c (re_search_2_stub): Likewise.  Use
	internal_function.
	(re_search_internal): Likewise.
	* resolv/res_init.c [RESOLVSORT] (net_mask): Convert to
	prototype-style function definition.
	* sunrpc/clnt_udp.c (clntudp_call): Likewise.
	* sunrpc/pmap_rmt.c (clnt_broadcast): Likewise.
	* sunrpc/rpcsvc/rusers.x (xdr_utmp): Likewise.
	(xdr_utmpptr): Likewise.
	(xdr_utmparr): Likewise.
	(xdr_utmpidle): Likewise.
	(xdr_utmpidleptr): Likewise.
	(xdr_utmpidlearr): Likewise.
This commit is contained in:
Joseph Myers
2015-10-21 11:57:23 +00:00
parent ca88f362a7
commit 85231522bb
8 changed files with 71 additions and 59 deletions

View File

@ -345,12 +345,11 @@ weak_alias (__re_search_2, re_search_2)
#endif
static int
re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
stop, ret_len)
struct re_pattern_buffer *bufp;
const char *string1, *string2;
int length1, length2, start, range, stop, ret_len;
struct re_registers *regs;
internal_function
re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
int length1, const char *string2, int length2, int start,
int range, struct re_registers *regs,
int stop, int ret_len)
{
const char *str;
int rval;
@ -606,14 +605,10 @@ re_exec (const char *s)
(START + RANGE >= 0 && START + RANGE <= LENGTH) */
static reg_errcode_t
__attribute_warn_unused_result__
re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
eflags)
const regex_t *preg;
const char *string;
int length, start, range, stop, eflags;
size_t nmatch;
regmatch_t pmatch[];
__attribute_warn_unused_result__ internal_function
re_search_internal (const regex_t *preg, const char *string, int length,
int start, int range, int stop, size_t nmatch,
regmatch_t pmatch[], int eflags)
{
reg_errcode_t err;
const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;