Skip to content

Commit ebd43ed

Browse files
committed
fix newlines in the example
Signed-off-by: Łukasz Plewa <[email protected]>
1 parent af5050f commit ebd43ed

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/basic/basic.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int main(void) {
2828

2929
res = umfMemoryProviderCreate(provider_ops, &params, &provider);
3030
if (res != UMF_RESULT_SUCCESS) {
31-
printf("Failed to create a memory provider!");
31+
printf("Failed to create a memory provider!\n");
3232
return -1;
3333
}
3434
printf("OS memory provider created at %p\n", (void *)provider);
@@ -41,7 +41,7 @@ int main(void) {
4141
res =
4242
umfMemoryProviderAlloc(provider, alloc_size, alignment, &ptr_provider);
4343
if (res != UMF_RESULT_SUCCESS) {
44-
printf("Failed to allocate memory from the memory provider!");
44+
printf("Failed to allocate memory from the memory provider!\n");
4545
goto memory_provider_destroy;
4646
}
4747

@@ -56,7 +56,7 @@ int main(void) {
5656
// Free allocated memory
5757
res = umfMemoryProviderFree(provider, ptr_provider, alloc_size);
5858
if (res != UMF_RESULT_SUCCESS) {
59-
printf("Failed to free memory to the provider!");
59+
printf("Failed to free memory to the provider!\n");
6060
goto memory_provider_destroy;
6161
}
6262
printf("Freed memory at %p\n", ptr_provider);
@@ -69,18 +69,18 @@ int main(void) {
6969

7070
res = umfPoolCreate(pool_ops, provider, pool_params, flags, &pool);
7171
if (res != UMF_RESULT_SUCCESS) {
72-
printf("\nFailed to create a pool!");
72+
printf("Failed to create a pool!\n");
7373
goto memory_provider_destroy;
7474
}
75-
printf("\nScalable memory pool created at %p\n", (void *)pool);
75+
printf("Scalable memory pool created at %p\n", (void *)pool);
7676

7777
// Allocate some memory in the pool
7878
size_t num = 1;
7979
alloc_size = 128;
8080

8181
char *ptr = umfPoolCalloc(pool, num, alloc_size);
8282
if (!ptr) {
83-
printf("Failed to allocate memory in the pool!");
83+
printf("Failed to allocate memory in the pool!\n");
8484
goto memory_pool_destroy;
8585
}
8686

@@ -97,7 +97,7 @@ int main(void) {
9797
umf_memory_provider_handle_t check_provider;
9898
res = umfPoolGetMemoryProvider(pool, &check_provider);
9999
if (res != UMF_RESULT_SUCCESS) {
100-
printf("Failed to retrieve a memory provider for the pool!");
100+
printf("Failed to retrieve a memory provider for the pool!\n");
101101
goto memory_pool_destroy;
102102
}
103103
printf("Pool at %p has been allocated from the provider at %p\n",

0 commit comments

Comments
 (0)