aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-06-22 08:48:50 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-06-22 08:48:50 +0530
commita735f03f7f5e61a1628ba5ec85d8bc317d47d93f (patch)
tree3963d3000932ab572a9de95317055adb68d5b1fe /src
parenta8da2670d79c57a4399d4e8c9bf48ba4920f0575 (diff)
(lexer): no point of asprintf'ing when it could be simply assigned
Diffstat (limited to 'src')
-rw-r--r--src/lexer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lexer.c b/src/lexer.c
index 5079d35..107cf31 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -75,8 +75,7 @@ found_start:
break;
}
- asprintf((char **) &directive->operands, "%s", operand);
- free(operand);
+ directive->operands = operand;
} else if (strncmp(buffer + n, "contentfor", strlen("contentfor")) == 0) {
directive->type = CONTENTFOR;
contentfor_operands_t *operands = malloc(sizeof(contentfor_operands_t));