~emersion/mrsh

8a39bf50e1bf4bd2c58adb22f6511c193b054583 — Drew DeVault 1 year, 1 month ago 4296e38
Check return value of times against (clock_t)-1

Fixes #76
1 files changed, 1 insertions(+), 1 deletions(-)

M builtin/times.c
M builtin/times.c => builtin/times.c +1 -1
@@ 22,7 22,7 @@ int builtin_times(struct mrsh_state *state, int argc, char *argv[]) {
		return EXIT_FAILURE;
	}

	if (times(&buf) == -1) {
	if (times(&buf) == (clock_t)-1) {
		fprintf(stderr, "times error: %s", strerror(errno));
		return EXIT_FAILURE;
	}