Skip to content

Commit 1edc6a4

Browse files
committed
data: Remove redundant redefinition of APPEND_EXPR macro
The original commit which added the optimization pass (commit 06964d7) contained a duplicate definition of the APPEND_EXPR macro, apparently by accident. Because it was an exact duplicate of the existing definition no compiler warning was generated. Fixes: commit 06964d7 (cherry picked from commit bbad43a)
1 parent aee50e8 commit 1edc6a4

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

plugins/data/format.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -841,18 +841,8 @@ optimize_ast (node_id root, node_id *root_rtn)
841841

842842
switch (get_node (root)->t) {
843843
case EXPR_LIST:
844-
/* Optimize each element of the list. For convenience this
845-
* builds a new node.
846-
*/
844+
/* Optimize each element of the list. */
847845
e.t = EXPR_LIST;
848-
#define APPEND_EXPR \
849-
do { \
850-
node_id _id = new_node (e); \
851-
if (node_ids_append (&list, _id) == -1) { \
852-
nbdkit_error ("realloc: %m"); \
853-
exit (EXIT_FAILURE); \
854-
} \
855-
} while (0)
856846

857847
for (i = 0; i < get_node (root)->list.size; ++i) {
858848
id = get_node (root)->list.ptr[i];

0 commit comments

Comments
 (0)