<commit_before>#include <stdio.h>
#include <errno.h>
#include "syscall.h"

int remove(const char *path)
{
	return (syscall(SYS_unlink, path) && errno == EISDIR)
		? syscall(SYS_rmdir, path) : 0;
}<commit_msg>fix messed-up errno if remove fails for a non-EISDIR reason<commit_after>#include <stdio.h>
#include <errno.h>
#include "syscall.h"

int remove(const char *path)
{
	int r = syscall(SYS_unlink, path);
	return (r && errno == EISDIR) ? syscall(SYS_rmdir, path) : r;
}
{'fraction_non_alphanumeric': 0.15677966101694915, 'fraction_numerical': 0.00211864406779661, 'mean_word_length': 5.306666666666667, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '764174', 'n_tokens_mistral': 200, 'n_tokens_neox': 178, 'n_words': 48}