Fossil SCM
minor simplification, and don't free zUuid if it was NULL
Commit
d6cb724e653611f69b673de4346883c3ec54d73e
Parent
4e126233caf6ef3…
1 file changed
+10
-10
+10
-10
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -70,20 +70,20 @@ | ||
| 70 | 70 | rid |
| 71 | 71 | ); |
| 72 | 72 | /* 01234567890123 */ |
| 73 | 73 | fossil_print("%-13s %s %s\n", zUuidName, zUuid, zDate ? zDate : ""); |
| 74 | 74 | free(zDate); |
| 75 | - } | |
| 76 | - if( zUuid && showComment ){ | |
| 77 | - zComment = db_text(0, | |
| 78 | - "SELECT coalesce(ecomment,comment) || " | |
| 79 | - " ' (user: ' || coalesce(euser,user,'?') || ')' " | |
| 80 | - " FROM event WHERE objid=%d", | |
| 81 | - rid | |
| 82 | - ); | |
| 83 | - } | |
| 84 | - free(zUuid); | |
| 75 | + if( showComment ){ | |
| 76 | + zComment = db_text(0, | |
| 77 | + "SELECT coalesce(ecomment,comment) || " | |
| 78 | + " ' (user: ' || coalesce(euser,user,'?') || ')' " | |
| 79 | + " FROM event WHERE objid=%d", | |
| 80 | + rid | |
| 81 | + ); | |
| 82 | + } | |
| 83 | + free(zUuid); | |
| 84 | + } | |
| 85 | 85 | if( showFamily ){ |
| 86 | 86 | db_prepare(&q, "SELECT uuid, pid, isprim FROM plink JOIN blob ON pid=rid " |
| 87 | 87 | " WHERE cid=%d" |
| 88 | 88 | " ORDER BY isprim DESC, mtime DESC /*sort*/", rid); |
| 89 | 89 | while( db_step(&q)==SQLITE_ROW ){ |
| 90 | 90 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -70,20 +70,20 @@ | |
| 70 | rid |
| 71 | ); |
| 72 | /* 01234567890123 */ |
| 73 | fossil_print("%-13s %s %s\n", zUuidName, zUuid, zDate ? zDate : ""); |
| 74 | free(zDate); |
| 75 | } |
| 76 | if( zUuid && showComment ){ |
| 77 | zComment = db_text(0, |
| 78 | "SELECT coalesce(ecomment,comment) || " |
| 79 | " ' (user: ' || coalesce(euser,user,'?') || ')' " |
| 80 | " FROM event WHERE objid=%d", |
| 81 | rid |
| 82 | ); |
| 83 | } |
| 84 | free(zUuid); |
| 85 | if( showFamily ){ |
| 86 | db_prepare(&q, "SELECT uuid, pid, isprim FROM plink JOIN blob ON pid=rid " |
| 87 | " WHERE cid=%d" |
| 88 | " ORDER BY isprim DESC, mtime DESC /*sort*/", rid); |
| 89 | while( db_step(&q)==SQLITE_ROW ){ |
| 90 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -70,20 +70,20 @@ | |
| 70 | rid |
| 71 | ); |
| 72 | /* 01234567890123 */ |
| 73 | fossil_print("%-13s %s %s\n", zUuidName, zUuid, zDate ? zDate : ""); |
| 74 | free(zDate); |
| 75 | if( showComment ){ |
| 76 | zComment = db_text(0, |
| 77 | "SELECT coalesce(ecomment,comment) || " |
| 78 | " ' (user: ' || coalesce(euser,user,'?') || ')' " |
| 79 | " FROM event WHERE objid=%d", |
| 80 | rid |
| 81 | ); |
| 82 | } |
| 83 | free(zUuid); |
| 84 | } |
| 85 | if( showFamily ){ |
| 86 | db_prepare(&q, "SELECT uuid, pid, isprim FROM plink JOIN blob ON pid=rid " |
| 87 | " WHERE cid=%d" |
| 88 | " ORDER BY isprim DESC, mtime DESC /*sort*/", rid); |
| 89 | while( db_step(&q)==SQLITE_ROW ){ |
| 90 |