From 918d386172736efcfef7c26172e9cf106f2da784 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 5 Oct 2024 14:46:45 +0300 Subject: [PATCH] src/vfs/cpio/cpio.c: fix coding style. Signed-off-by: Andrew Borodin --- src/vfs/cpio/cpio.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vfs/cpio/cpio.c b/src/vfs/cpio/cpio.c index 035876e7b..6b26d12ab 100644 --- a/src/vfs/cpio/cpio.c +++ b/src/vfs/cpio/cpio.c @@ -560,6 +560,7 @@ cpio_read_bin_head (struct vfs_class *me, struct vfs_s_super *super) if (arch->type == CPIO_BINRE) { int i; + for (i = 0; i < (HEAD_LENGTH >> 1); i++) u.shorts[i] = GUINT16_SWAP_LE_BE_CONSTANT (u.shorts[i]); } @@ -580,7 +581,7 @@ cpio_read_bin_head (struct vfs_class *me, struct vfs_s_super *super) CPIO_POS (super) += len; cpio_skip_padding (super); - if (!strcmp ("TRAILER!!!", name)) + if (strcmp ("TRAILER!!!", name) == 0) { /* We got to the last record */ g_free (name); return STATUS_TRAIL; @@ -653,7 +654,7 @@ cpio_read_oldc_head (struct vfs_class *me, struct vfs_s_super *super) CPIO_POS (super) += len; cpio_skip_padding (super); - if (!strcmp ("TRAILER!!!", name)) + if (strcmp ("TRAILER!!!", name) == 0) { /* We got to the last record */ g_free (name); return STATUS_TRAIL; @@ -831,6 +832,7 @@ cpio_super_same (const vfs_path_element_t *vpath_element, struct vfs_s_super *pa vfs_rmstamp (vfs_cpiofs_ops, (vfsid) parc); return 2; } + /* Hasn't been modified, give it a new timeout */ vfs_stamp (vfs_cpiofs_ops, (vfsid) parc); return 1;