delta: preprocess delta line with uci_parse_argument().
[project/uci.git] / file.c
diff --git a/file.c b/file.c
index 0fc68a64f4f11b5d4a55ffb3919bc9be9dfc052f..5be2e66b227ee88f627c5af17a52a265dd017b56 100644 (file)
--- a/file.c
+++ b/file.c
@@ -278,13 +278,8 @@ int uci_parse_argument(struct uci_context *ctx, FILE *stream, char **str, char *
                uci_alloc_parse_context(ctx);
 
        ctx->pctx->file = stream;
-
-       if (!*str) {
+       if (!*str)
                uci_getln(ctx, 0);
-               *str = ctx->pctx->buf;
-       } else {
-               UCI_ASSERT(ctx, ctx->pctx->pos == *str - ctx->pctx->buf);
-       }
 
        /*FIXME do we need to skip empty lines? */
        ofs_result = next_arg(ctx, false, false);