Skip to content
Snippets Groups Projects
Commit ee61bca1 authored by Ettayeb Yassine's avatar Ettayeb Yassine
Browse files

usage de @ split ret==0;

parent ef1ee34e
No related branches found
No related tags found
No related merge requests found
#include <stdlib.h>
#include <stdio.h>
enum { OLD_SIZE = 10, NEW_SIZE = 20 };
int *resize_array(int *array, size_t count) {
......@@ -7,7 +9,7 @@ int *resize_array(int *array, size_t count) {
return 0;
}
int *ret = (int *)realloc(array, count * sizeof(int));
int *ret = (int *)realloc(array, count * sizeof(int)); //@ split ret==0;
if (!ret) {
free(array);
return 0;
......@@ -26,6 +28,7 @@ void func(void) {
for (size_t i = 0; i < OLD_SIZE; ++i) {
array[i] = i;
Frama_C_show_each_init_array(array[i]);
}
array = resize_array(array, NEW_SIZE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment