diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-02-09 14:21:56 +0200 | 
|---|---|---|
| committer | Donatas Abraitis <donatas.abraitis@gmail.com> | 2020-02-09 14:21:56 +0200 | 
| commit | 95f7965d09a6eb4447c0de5a679114492cac3f37 (patch) | |
| tree | 1bfa78792b4f62934a483104e921f0bff5809590 /lib/printf | |
| parent | 5f1032f291b8581d44570047f2d063bb6daea983 (diff) | |
*: Remove parenthesis on return for constants
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/printf')
| -rw-r--r-- | lib/printf/printf-pos.c | 36 | ||||
| -rw-r--r-- | lib/printf/vfprintf.c | 6 | 
2 files changed, 21 insertions, 21 deletions
diff --git a/lib/printf/printf-pos.c b/lib/printf/printf-pos.c index 45e4f86229..20a58eacdc 100644 --- a/lib/printf/printf-pos.c +++ b/lib/printf/printf-pos.c @@ -125,11 +125,11 @@ _ensurespace(struct typetable *types)  	if (types->nextarg >= types->tablesize) {  		if (__grow_type_table(types)) -			return (-1); +			return -1;  	}  	if (types->nextarg > types->tablemax)  		types->tablemax = types->nextarg; -	return (0); +	return 0;  }  /* @@ -141,9 +141,9 @@ addtype(struct typetable *types, enum typeid type)  {  	if (_ensurespace(types)) -		return (-1); +		return -1;  	types->table[types->nextarg++] = type; -	return (0); +	return 0;  }  static inline int @@ -151,7 +151,7 @@ addsarg(struct typetable *types, int flags)  {  	if (_ensurespace(types)) -		return (-1); +		return -1;  	if (flags & LONGDBL)  		types->table[types->nextarg++] = T_INT64T;  	else if (flags & INTMAXT) @@ -166,7 +166,7 @@ addsarg(struct typetable *types, int flags)  		types->table[types->nextarg++] = T_LONG;  	else  		types->table[types->nextarg++] = T_INT; -	return (0); +	return 0;  }  static inline int @@ -174,7 +174,7 @@ adduarg(struct typetable *types, int flags)  {  	if (_ensurespace(types)) -		return (-1); +		return -1;  	if (flags & LONGDBL)  		types->table[types->nextarg++] = T_UINT64T;  	else if (flags & INTMAXT) @@ -189,7 +189,7 @@ adduarg(struct typetable *types, int flags)  		types->table[types->nextarg++] = T_U_LONG;  	else  		types->table[types->nextarg++] = T_U_INT; -	return (0); +	return 0;  }  /* @@ -211,14 +211,14 @@ addaster(struct typetable *types, char **fmtp)  		u_int hold = types->nextarg;  		types->nextarg = n2;  		if (addtype(types, T_INT)) -			return (-1); +			return -1;  		types->nextarg = hold;  		*fmtp = ++cp;  	} else {  		if (addtype(types, T_INT)) -			return (-1); +			return -1;  	} -	return (0); +	return 0;  }  #ifdef WCHAR_SUPPORT @@ -238,14 +238,14 @@ addwaster(struct typetable *types, wchar_t **fmtp)  		u_int hold = types->nextarg;  		types->nextarg = n2;  		if (addtype(types, T_INT)) -			return (-1); +			return -1;  		types->nextarg = hold;  		*fmtp = ++cp;  	} else {  		if (addtype(types, T_INT)) -			return (-1); +			return -1;  	} -	return (0); +	return 0;  }  #endif /* WCHAR_SUPPORT */ @@ -652,19 +652,19 @@ __grow_type_table(struct typetable *types)  	/* Detect overflow */  	if (types->nextarg > MAX_POSARG) -		return (-1); +		return -1;  	newsize = oldsize * 2;  	if (newsize < types->nextarg + 1)  		newsize = types->nextarg + 1;  	if (oldsize == STATIC_ARG_TBL_SIZE) {  		if ((newtable = malloc(newsize * sizeof(enum typeid))) == NULL) -			return (-1); +			return -1;  		bcopy(oldtable, newtable, oldsize * sizeof(enum typeid));  	} else {  		newtable = realloc(oldtable, newsize * sizeof(enum typeid));  		if (newtable == NULL) -			return (-1); +			return -1;  	}  	for (n = oldsize; n < newsize; n++)  		newtable[n] = T_UNUSED; @@ -672,7 +672,7 @@ __grow_type_table(struct typetable *types)  	types->table = newtable;  	types->tablesize = newsize; -	return (0); +	return 0;  }  /* diff --git a/lib/printf/vfprintf.c b/lib/printf/vfprintf.c index 07df6dd8fe..6ffccb3811 100644 --- a/lib/printf/vfprintf.c +++ b/lib/printf/vfprintf.c @@ -94,7 +94,7 @@ __wcsconv(wchar_t *wcsarg, int prec)  		mbs = initial;  		nbytes = wcsrtombs(NULL, (const wchar_t **)&p, 0, &mbs);  		if (nbytes == (size_t)-1) -			return (NULL); +			return NULL;  	} else {  		/*  		 * Optimisation: if the output precision is small enough, @@ -117,7 +117,7 @@ __wcsconv(wchar_t *wcsarg, int prec)  		}  	}  	if ((convbuf = malloc(nbytes + 1)) == NULL) -		return (NULL); +		return NULL;  	/* Fill the output buffer. */  	p = wcsarg; @@ -125,7 +125,7 @@ __wcsconv(wchar_t *wcsarg, int prec)  	if ((nbytes = wcsrtombs(convbuf, (const wchar_t **)&p,  	    nbytes, &mbs)) == (size_t)-1) {  		free(convbuf); -		return (NULL); +		return NULL;  	}  	convbuf[nbytes] = '\0';  	return (convbuf);  | 
