toolbox

Check-in [f160722ec0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:townsign: unlink town file properly
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: f160722ec04d18a442a5bc438de951f7eb63b571a92d89789264d802f7de17b4
User & Date: jef 2019-08-23 19:08:43
Context
2019-08-23
19:40
townsign: use tmp_file() in font_file() check-in: c80a11437c user: jef tags: trunk
19:08
townsign: unlink town file properly check-in: f160722ec0 user: jef tags: trunk
18:49
townsign: add check on write() call check-in: bddff63dab user: jef tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/townsign/townsign.c.

303
304
305
306
307
308
309
310
311
312

313
314
315
316
317
318
		rfile = road_sign(rflag);
		rtfile = road_town_sign(rfile, tfile);
		cat_file(rtfile);
		unlink(rfile);
		unlink(rtfile);
		xfree(rfile);
		xfree(rtfile);
		return EXIT_SUCCESS;
	}


	cat_file(tfile);
	unlink(tfile);
	xfree(tfile);

	return EXIT_SUCCESS;
}







<


>
|





303
304
305
306
307
308
309

310
311
312
313
314
315
316
317
318
		rfile = road_sign(rflag);
		rtfile = road_town_sign(rfile, tfile);
		cat_file(rtfile);
		unlink(rfile);
		unlink(rtfile);
		xfree(rfile);
		xfree(rtfile);

	}

	if (rflag == -1)
		cat_file(tfile);
	unlink(tfile);
	xfree(tfile);

	return EXIT_SUCCESS;
}