Mercurial > hg > audiodb
annotate close.cpp @ 398:443c2939e84b api-inversion
off_t in ABI structures is a bad thing.
Why? Because its size depends on the compile-time environment. It was
OK, ish, when the only off_t was at the end of the struct, because then
we only stomped on uninitialized bits of memory; it is terrible when
there is more than one off_t kind of field. Use uint64_t for those
fields instead.
author | mas01cr |
---|---|
date | Thu, 27 Nov 2008 15:19:47 +0000 |
parents | 78fed0d4c108 |
children | 58b88ab69424 |
rev | line source |
---|---|
mas01cr@392 | 1 #include "audioDB.h" |
mas01cr@392 | 2 extern "C" { |
mas01cr@392 | 3 #include "audioDB_API.h" |
mas01cr@392 | 4 } |
mas01cr@392 | 5 |
mas01cr@392 | 6 void audiodb_close(adb_t *adb) { |
mas01cr@392 | 7 free(adb->path); |
mas01cr@392 | 8 free(adb->header); |
mas01cr@392 | 9 close(adb->fd); |
mas01cr@392 | 10 free(adb); |
mas01cr@392 | 11 } |