Fossil SCM

Removed an if() condition in content_put_ex() which was possible back in 2007 but is no longer possible. Updated the surrounding content to reflect current reality.

stephan 2021-02-25 10:12 trunk
Commit dad521bb06757a7fc3c5e07b5bf818df3e5cc7de544fe5c7f2d34142574bd540
1 file changed +3 -4
+3 -4
--- src/content.c
+++ src/content.c
@@ -555,14 +555,13 @@
555555
** or not the entry is a phantom
556556
*/
557557
db_prepare(&s1, "SELECT rid, size FROM blob WHERE uuid=%B", &hash);
558558
if( db_step(&s1)==SQLITE_ROW ){
559559
rid = db_column_int(&s1, 0);
560
- if( db_column_int(&s1, 1)>=0 || pBlob==0 ){
561
- /* Either the entry is not a phantom or it is a phantom but we
562
- ** have no data with which to dephantomize it. In either case,
563
- ** there is nothing for us to do other than return the RID. */
560
+ if( db_column_int(&s1, 1)>=0 ){
561
+ /* The entry is not a phantom. There is nothing for us to do
562
+ ** other than return the RID. */
564563
db_finalize(&s1);
565564
db_end_transaction(0);
566565
return rid;
567566
}
568567
}else{
569568
--- src/content.c
+++ src/content.c
@@ -555,14 +555,13 @@
555 ** or not the entry is a phantom
556 */
557 db_prepare(&s1, "SELECT rid, size FROM blob WHERE uuid=%B", &hash);
558 if( db_step(&s1)==SQLITE_ROW ){
559 rid = db_column_int(&s1, 0);
560 if( db_column_int(&s1, 1)>=0 || pBlob==0 ){
561 /* Either the entry is not a phantom or it is a phantom but we
562 ** have no data with which to dephantomize it. In either case,
563 ** there is nothing for us to do other than return the RID. */
564 db_finalize(&s1);
565 db_end_transaction(0);
566 return rid;
567 }
568 }else{
569
--- src/content.c
+++ src/content.c
@@ -555,14 +555,13 @@
555 ** or not the entry is a phantom
556 */
557 db_prepare(&s1, "SELECT rid, size FROM blob WHERE uuid=%B", &hash);
558 if( db_step(&s1)==SQLITE_ROW ){
559 rid = db_column_int(&s1, 0);
560 if( db_column_int(&s1, 1)>=0 ){
561 /* The entry is not a phantom. There is nothing for us to do
562 ** other than return the RID. */
 
563 db_finalize(&s1);
564 db_end_transaction(0);
565 return rid;
566 }
567 }else{
568

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button