diff options
| author | Damien George | 2014-04-01 21:15:03 +0100 |
|---|---|---|
| committer | Damien George | 2014-04-01 21:15:03 +0100 |
| commit | e3e050029677bdd19d99f8ee6135ad78eb9d52e6 (patch) | |
| tree | 7c30d86d19e42b6fbef86ea8e6e78e9e24676327 | |
| parent | e8e8f212aa0843eb701146eb6e2ccc3e77164078 (diff) | |
py: Make pfenv.c conform to code conventions.
| -rw-r--r-- | py/pfenv.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/py/pfenv.c b/py/pfenv.c index 67835e43a..7ce721aca 100644 --- a/py/pfenv.c +++ b/py/pfenv.c @@ -1,7 +1,6 @@ #include <stdint.h> #include <string.h> -///#include "std.h" #include "misc.h" #include "mpconfig.h" #include "qstr.h" @@ -55,8 +54,9 @@ int pfenv_print_strn(const pfenv_t *pfenv, const char *str, unsigned int len, in if (left_pad) { while (left_pad > 0) { int p = left_pad; - if (p > pad_size) + if (p > pad_size) { p = pad_size; + } pfenv->print_strn(pfenv->data, pad_chars, p); left_pad -= p; } @@ -65,8 +65,9 @@ int pfenv_print_strn(const pfenv_t *pfenv, const char *str, unsigned int len, in if (right_pad) { while (right_pad > 0) { int p = right_pad; - if (p > pad_size) + if (p > pad_size) { p = pad_size; + } pfenv->print_strn(pfenv->data, pad_chars, p); right_pad -= p; } @@ -205,7 +206,7 @@ int pfenv_print_float(const pfenv_t *pfenv, mp_float_t f, char fmt, int flags, c // so suppress the zero fill. fill = ' '; } - chrs += pfenv_print_strn(pfenv, s, len, flags, fill, width); + chrs += pfenv_print_strn(pfenv, s, len, flags, fill, width); return chrs; } |
