File: array_fail.c

package info (click to toggle)
libowfat 0.32-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,544 kB
  • sloc: ansic: 17,551; makefile: 14
file content (9 lines) | stat: -rw-r--r-- 143 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
#include <stdlib.h>
#include "array.h"

void array_fail(array* x) {
  if (x->p) free(x->p);
  x->p=0;
  x->initialized=0;
  x->allocated=-1;
}