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/printf-pos.c | |
| parent | 5f1032f291b8581d44570047f2d063bb6daea983 (diff) | |
*: Remove parenthesis on return for constants
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'lib/printf/printf-pos.c')
| -rw-r--r-- | lib/printf/printf-pos.c | 36 |
1 files changed, 18 insertions, 18 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; } /* |
