Skip to content

Add a helper function for malloc and print in emit templates #1475

Description

@scolsen

There are a couple cases in which we we perform the following pattern in templates:

String buf = CARP_MALLOC(n);
snprintf(buf, n, "some string of len n");

we could wrap these with allocBufferAndPrint "string" computing size based on "string" length.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions