summaryrefslogtreecommitdiffstats
path: root/xlators/meta/src/frames-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/meta/src/frames-file.c')
-rw-r--r--xlators/meta/src/frames-file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xlators/meta/src/frames-file.c b/xlators/meta/src/frames-file.c
index 7d48d7a62d4..ebac3d9cbaa 100644
--- a/xlators/meta/src/frames-file.c
+++ b/xlators/meta/src/frames-file.c
@@ -39,8 +39,7 @@ frames_file_fill (xlator_t *this, inode_t *file, strfd_t *strfd)
strprintf (strfd, "\t\t\"Number\": %d,\n", ++i);
strprintf (strfd, "\t\t\"Frame\": [\n");
j = 1;
- for (frame = &stack->frames; frame;
- frame = frame->next) {
+ list_for_each_entry (frame, &stack->myframes, frames) {
strprintf (strfd, "\t\t {\n");
strprintf (strfd, "\t\t\t\"Number\": %d,\n",
j++);
@@ -71,7 +70,8 @@ frames_file_fill (xlator_t *this, inode_t *file, strfd_t *strfd)
frame->unwind_to);
strprintf (strfd, "\t\t\t\"Complete\": %d\n",
frame->complete);
- if (frame->next == NULL)
+ if (list_is_last (&frame->frames,
+ &stack->myframes))
strprintf (strfd, "\t\t }\n");
else
strprintf (strfd, "\t\t },\n");