From: Simon Glass Date: Mon, 22 May 2017 05:05:28 -0600 Subject: [U-Boot] [PATCH 07/15] bootstage: Show records with a zero time In-Reply-To: <20170522110536.6231-1-sjg@chromium.org> References: <20170522110536.6231-1-sjg@chromium.org> Message-ID: <20170522110536.6231-8-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de We can now use the record count to determine whether a record is valid or not. Drop the test for a zero time. Signed-off-by: Simon Glass --- common/bootstage.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/common/bootstage.c b/common/bootstage.c index 8cd2fb5e1b..1afdee3018 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -390,18 +390,15 @@ int bootstage_stash(void *base, int size) /* Write the records, silently stopping when we run out of space */ for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) { - if (rec->time_us != 0) - append_data(&ptr, end, rec, sizeof(*rec)); + append_data(&ptr, end, rec, sizeof(*rec)); } /* Write the name strings */ for (rec = data->record, i = 0; i < data->rec_count; i++, rec++) { - if (rec->time_us != 0) { - const char *name; + const char *name; - name = get_record_name(buf, sizeof(buf), rec); - append_data(&ptr, end, name, strlen(name) + 1); - } + name = get_record_name(buf, sizeof(buf), rec); + append_data(&ptr, end, name, strlen(name) + 1); } /* Check for buffer overflow */ -- 2.13.0.303.g4ebf302169-goog