Skip to content

Commit

Permalink
Reformat some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dargueta committed Mar 15, 2024
1 parent 41e096c commit 9c65b04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/metaldata/writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,15 @@ MDL_ANNOTN__NONNULL
void *mdl_writer_getudata(const MDLWriter *writer);

/**
* Get a pointer to the output buffer, @e if this was initialized with one.
* Get a pointer to the output buffer @e if this was initialized with one.
*
* If the writer was initialized to write to memory (e.g. @ref mdl_writer_newwithbuffer
* or @ref mdl_writer_initwithbuffer), return this buffer and its size, in bytes.
*
* @param writer The writer to operate on.
* @param p_length An optional pointer to a size_t where the size will be stored. If this
* writer doesn't write to a memory buffer, this is not modified.
* @param[out] p_length
* An optional pointer to a size_t where the size will be stored. If this writer
* doesn't write to a memory buffer, @a p_length is not modified.
* @return NULL if the writer doesn't write to memory, or a pointer to memory otherwise.
*/
MDL_API
Expand Down
11 changes: 6 additions & 5 deletions tests/memblklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@ MunitResult test_memblklist__length_zero(const MunitParameter params[], void *us

MDLState *ds = (MDLState *)userdata;
MDLMemBlkList list;
size_t length;
int error;

error = mdl_memblklist_init(ds, &list, 32);
int error = mdl_memblklist_init(ds, &list, 32);
munit_assert_int(error, ==, MDL_OK);
munit_assert_size(list.elem_size, ==, 32);

length = mdl_memblklist_length(&list);
size_t length = mdl_memblklist_length(&list);
munit_assert_size(length, ==, 0);
mdl_memblklist_destroy(&list);

error = mdl_memblklist_destroy(&list);
munit_assert_int(error, ==, MDL_OK);

return MUNIT_OK;
}

0 comments on commit 9c65b04

Please sign in to comment.