Fossil SCM

minor simplification, and don't free zUuid if it was NULL

jan.nijtmans 2016-11-19 20:11 trunk
Commit d6cb724e653611f69b673de4346883c3ec54d73e
1 file changed +10 -10
+10 -10
--- src/info.c
+++ src/info.c
@@ -70,20 +70,20 @@
7070
rid
7171
);
7272
/* 01234567890123 */
7373
fossil_print("%-13s %s %s\n", zUuidName, zUuid, zDate ? zDate : "");
7474
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
+ }
8585
if( showFamily ){
8686
db_prepare(&q, "SELECT uuid, pid, isprim FROM plink JOIN blob ON pid=rid "
8787
" WHERE cid=%d"
8888
" ORDER BY isprim DESC, mtime DESC /*sort*/", rid);
8989
while( db_step(&q)==SQLITE_ROW ){
9090
--- 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

Keyboard Shortcuts

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