Commit 7ab6f2d
committed
Change inv_truncate() to not repeat its systable_getnext_ordered() scan.
In the case where the initial call of systable_getnext_ordered() returned
NULL, this function would nonetheless call it again. That's undefined
behavior that only by chance failed to not give visibly incorrect results.
Put an if-test around the final loop to prevent that, and in passing
improve some comments. No back-patch since there's no actual failure.
Per report from YAMAMOTO Takashi.1 parent 8b6f5f2 commit 7ab6f2d
1 file changed
+16
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
765 | 768 | | |
766 | 769 | | |
767 | 770 | | |
| |||
841 | 844 | | |
842 | 845 | | |
843 | 846 | | |
844 | | - | |
| 847 | + | |
| 848 | + | |
845 | 849 | | |
846 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
847 | 853 | | |
| 854 | + | |
848 | 855 | | |
849 | 856 | | |
850 | 857 | | |
| |||
873 | 880 | | |
874 | 881 | | |
875 | 882 | | |
876 | | - | |
| 883 | + | |
| 884 | + | |
877 | 885 | | |
878 | | - | |
| 886 | + | |
879 | 887 | | |
880 | | - | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
881 | 892 | | |
882 | 893 | | |
883 | 894 | | |
| |||
0 commit comments