Issue 7961 - [LMDB] remove logically dead code (2nd)
Summary: [LMDB] remove logically dead code (2nd)
Status: VERIFIED FIXED
Alias: None
Product: LMDB
Classification: Unclassified
Component: liblmdb (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-04 15:30 UTC by jcd@tribudubois.net
Modified: 2020-03-12 15:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description jcd@tribudubois.net 2014-10-04 15:30:54 UTC
Full_Name: Jean-Christophe Dubois
Version: 2.4.40
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (78.235.240.156)


In function mdb_txn_begin() at line 2672 there is a check for the parent
pointer.

The same check is done few lines earlier (line 2665) and if the condition was
met the program would have skip the all section to ok:

So code line 2673 can never be reached. It could be removed.

Patch available at URL below: 

https://github.com/jcdubois/lmdb/commit/a3770a5fef56417ceea677efbbde768755188af4

JC
Comment 1 Howard Chu 2014-10-04 20:51:40 UTC
jcd@tribudubois.net wrote:
> Full_Name: Jean-Christophe Dubois
> Version: 2.4.40
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (78.235.240.156)
>
>
> In function mdb_txn_begin() at line 2672 there is a check for the parent
> pointer.
>
> The same check is done few lines earlier (line 2665) and if the condition was
> met the program would have skip the all section to ok:
>
> So code line 2673 can never be reached. It could be removed.

Thanks. This was leftover from 4d02c741b120786df1b87ee9ed49c1d3f9bc7522. Fixed 
in mdb.master.
>
> Patch available at URL below:
>
> https://github.com/jcdubois/lmdb/commit/a3770a5fef56417ceea677efbbde768755188af4
>
> JC
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 OpenLDAP project 2014-10-04 20:51:56 UTC
fixed in mdb.master
Comment 3 Howard Chu 2014-10-04 20:51:56 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 4 Quanah Gibson-Mount 2014-12-11 01:05:46 UTC
changed state Test to Release
Comment 5 Quanah Gibson-Mount 2015-07-02 17:45:14 UTC
changed state Release to Closed