Changeset 04a7435f in mainline for uspace/app/bithenge/test.c
- Timestamp:
- 2012-06-26T19:56:26Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 978ccaf1
- Parents:
- f2da0bb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bithenge/test.c
rf2da0bb r04a7435f 69 69 bithenge_node_dec_ref(node); 70 70 } else { 71 bithenge_transform_t *transform; 71 bithenge_transform_t *transform = NULL; 72 bithenge_node_t *node = NULL, *node2 = NULL; 72 73 rc = bithenge_parse_script(argv[1], &transform); 73 74 if (rc != EOK) { 74 75 printf("Error parsing script: %s\n", str_error(rc)); 75 return 1;76 goto error; 76 77 } 77 78 78 bithenge_node_t *node, *node2;79 79 int rc = bithenge_node_from_source(&node, argv[2]); 80 80 if (rc != EOK) { 81 81 printf("Error creating node from source: %s\n", str_error(rc)); 82 return 1;82 goto error; 83 83 } 84 84 … … 86 86 if (rc != EOK) { 87 87 printf("Error applying transform: %s\n", str_error(rc)); 88 return 1;88 goto error; 89 89 } 90 90 91 91 bithenge_node_dec_ref(node); 92 node = NULL; 92 93 bithenge_transform_dec_ref(transform); 94 transform = NULL; 93 95 94 96 rc = bithenge_print_node(BITHENGE_PRINT_PYTHON, node2); 95 97 if (rc != EOK) { 96 98 printf("Error printing node: %s\n", str_error(rc)); 97 return 1;99 goto error; 98 100 } 99 101 bithenge_node_dec_ref(node2); 102 node2 = NULL; 100 103 printf("\n"); 104 105 return 0; 106 107 error: 108 bithenge_node_dec_ref(node); 109 bithenge_node_dec_ref(node2); 110 bithenge_transform_dec_ref(transform); 111 return 1; 101 112 } 102 113
Note:
See TracChangeset
for help on using the changeset viewer.