int of_closefork(struct ofork *ofork)
{
struct timeval tv;
- int adflags, doflush = 0;
+ int doflush = 0;
int ret;
- adflags = 0;
- if ((ofork->of_flags & AFPFORK_DATA) && (ad_data_fileno( ofork->of_ad ) != -1)) {
- adflags |= ADFLAGS_DF;
- }
if ( (ofork->of_flags & AFPFORK_OPEN) && ad_reso_fileno( ofork->of_ad ) != -1 ) {
- adflags |= ADFLAGS_HF;
/*
* Only set the rfork's length if we're closing the rfork.
*/
}
}
ret = 0;
-
if (ad_unref(ofork->of_ad) == 0) {
- if ( ad_close( ofork->of_ad, adflags ) < 0 ) {
+ if ( ad_close( ofork->of_ad, 0 ) < 0 ) {
ret = -1;
}
}
/* Refcounting open forks using one struct adouble */
#define ad_ref(ad) (ad)->ad_refcount++
-#define ad_unref(ad) (ad)->ad_refcount--
+#define ad_unref(ad) --((ad)->ad_refcount)
/* ad_flush.c */
extern int ad_rebuild_adouble_header (struct adouble *);