Fossil SCM

Restore some styling improvements.

jan.nijtmans 2013-10-14 10:54 UTC tkt-change-hook
Commit ee598d69be048265df0ee0df71a67299cf807acd
1 file changed +4 -5
+4 -5
--- src/xfer.c
+++ src/xfer.c
@@ -825,25 +825,24 @@
825825
826826
/*
827827
** Run the specified TH1 script, if any, and returns 1 on error.
828828
*/
829829
int xfer_run_script(const char *zScript, const char *zUuid){
830
- int result = 0;
830
+ int result = TH_ERROR;
831831
if( !commonScriptRan || !zScript || !(zScript = db_get(zScript, 0))){
832
- return 0; /* No script or common script didn't run, return success. */
832
+ /* No script or common script didn't run, return success. */
833
+ return TH_OK;
833834
}
834835
if( commonScriptRan == 1 ){
835836
if( zUuid ){
836837
result = Th_SetVar(g.interp, "uuid", -1, zUuid, -1);
837838
if( result!=TH_OK ){
838839
fossil_error(1, "%s", Th_GetResult(g.interp, 0));
839840
return result;
840841
}
841842
}
842
- result = Th_Eval(g.interp, 0, zScript, -1) != TH_OK;
843
- }else{
844
- result = TH_ERROR;
843
+ result = Th_Eval(g.interp, 0, zScript, -1);
845844
}
846845
if( result!=TH_OK ){
847846
fossil_error(1, "%s", Th_GetResult(g.interp, 0));
848847
}
849848
return result;
850849
--- src/xfer.c
+++ src/xfer.c
@@ -825,25 +825,24 @@
825
826 /*
827 ** Run the specified TH1 script, if any, and returns 1 on error.
828 */
829 int xfer_run_script(const char *zScript, const char *zUuid){
830 int result = 0;
831 if( !commonScriptRan || !zScript || !(zScript = db_get(zScript, 0))){
832 return 0; /* No script or common script didn't run, return success. */
 
833 }
834 if( commonScriptRan == 1 ){
835 if( zUuid ){
836 result = Th_SetVar(g.interp, "uuid", -1, zUuid, -1);
837 if( result!=TH_OK ){
838 fossil_error(1, "%s", Th_GetResult(g.interp, 0));
839 return result;
840 }
841 }
842 result = Th_Eval(g.interp, 0, zScript, -1) != TH_OK;
843 }else{
844 result = TH_ERROR;
845 }
846 if( result!=TH_OK ){
847 fossil_error(1, "%s", Th_GetResult(g.interp, 0));
848 }
849 return result;
850
--- src/xfer.c
+++ src/xfer.c
@@ -825,25 +825,24 @@
825
826 /*
827 ** Run the specified TH1 script, if any, and returns 1 on error.
828 */
829 int xfer_run_script(const char *zScript, const char *zUuid){
830 int result = TH_ERROR;
831 if( !commonScriptRan || !zScript || !(zScript = db_get(zScript, 0))){
832 /* No script or common script didn't run, return success. */
833 return TH_OK;
834 }
835 if( commonScriptRan == 1 ){
836 if( zUuid ){
837 result = Th_SetVar(g.interp, "uuid", -1, zUuid, -1);
838 if( result!=TH_OK ){
839 fossil_error(1, "%s", Th_GetResult(g.interp, 0));
840 return result;
841 }
842 }
843 result = Th_Eval(g.interp, 0, zScript, -1);
 
 
844 }
845 if( result!=TH_OK ){
846 fossil_error(1, "%s", Th_GetResult(g.interp, 0));
847 }
848 return result;
849

Keyboard Shortcuts

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