NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/51422: unnecesary assignation in buf_destroy sbin/fsck_lfs/bufcache.c
>Number: 51422
>Category: bin
>Synopsis: unnecesary assignation in buf_destroy sbin/fsck_lfs/bufcache.c
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Aug 18 02:35:00 +0000 2016
>Originator: Jose Luis Rodriguez Garcia
>Release: current
>Organization:
>Environment:
>Description:
In bufcache.c the assignation bp->b_flags |= B_NEEDCOMMIT; is
unncesary because in the same function bp is freed with: free(bp);is
>How-To-Repeat:
code review
>Fix:
Index: bufcache.c
===================================================================
RCS file: /cvsroot/src/sbin/fsck_lfs/bufcache.c,v
retrieving revision 1.16
diff -u -r1.16 bufcache.c
--- bufcache.c 31 Jul 2016 18:27:26 -0000 1.16
+++ bufcache.c 18 Aug 2016 02:17:21 -0000
@@ -155,7 +155,6 @@
void
buf_destroy(struct ubuf * bp)
{
- bp->b_flags |= B_NEEDCOMMIT;
LIST_REMOVE(bp, b_vnbufs);
LIST_REMOVE(bp, b_hash);
if (!(bp->b_flags & B_DONTFREE))
Home |
Main Index |
Thread Index |
Old Index