diff options
author | Roland McGrath <roland@gnu.org> | 1998-10-20 09:48:26 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1998-10-20 09:48:26 +0000 |
commit | caf7ac6e90416c95f67a381835980e3da3570eb0 (patch) | |
tree | 28077a76d06d42200c6a432d37d51e50b377d467 /libps/fmt.c | |
parent | fc40a731d23f893be2cb7699d7e078568d4c210c (diff) |
Add braces to silence gcc warnings.
Diffstat (limited to 'libps/fmt.c')
-rw-r--r-- | libps/fmt.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/libps/fmt.c b/libps/fmt.c index 764711ae..eae08ffe 100644 --- a/libps/fmt.c +++ b/libps/fmt.c @@ -1,7 +1,7 @@ /* Implements the ps_fmt type, which describes how to output a user-readable version of a proc_stat. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -240,11 +240,13 @@ _fmt_create (char *src, int posix, struct ps_fmt_specs *fmt_specs, } if (! field->title) - /* No explicit title specified in the fmt string. */ - if (field->spec->title) - field->title = field->spec->title; /* But the spec has one. */ - else - field->title = field->spec->name; /* Just use the field name. */ + { + /* No explicit title specified in the fmt string. */ + if (field->spec->title) + field->title = field->spec->title; /* But the spec has one. */ + else + field->title = field->spec->name; /* Just use field name. */ + } /* Add FIELD's required pstat_flags to FMT's set */ needs |= ps_getter_needs (ps_fmt_spec_getter (field->spec)); @@ -255,7 +257,7 @@ _fmt_create (char *src, int posix, struct ps_fmt_specs *fmt_specs, field->precision = field->spec->precision; field->flags = (field->spec->flags & ~clr_flags) ^ inv_flags; - + if (quoted_name && *src == '}') /* Skip optional trailing `}' after the spec name. */ src++; @@ -324,7 +326,7 @@ ps_fmt_creation_error (char *src, int posix, struct ps_fmt_specs *fmt_specs, } /* Free FMT, and any resources it consumes. */ -void +void ps_fmt_free (struct ps_fmt *fmt) { FREE (fmt->src); @@ -475,7 +477,7 @@ ps_fmt_squash (struct ps_fmt *fmt, int (*fn)(struct ps_fmt_field *field)) { /* Save the old prefix, in case we're deleting the first field, and need to prepend it to the next field. */ - const char *beg_pfx = field->pfx; + const char *beg_pfx = field->pfx; int beg_pfx_len = field->pfx_len; nfields--; |