From: Wolfgang (Blub) Bumiller Date: Sun, 25 Nov 2012 14:35:04 +0000 (+0100) Subject: Simplify some condition in the tester X-Git-Tag: 0.1.9~271 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f132166f468a28b82c3f7935ebd9b88909ebc185;p=xonotic%2Fgmqcc.git Simplify some condition in the tester --- diff --git a/test.c b/test.c index 0008068..86e76f7 100644 --- a/test.c +++ b/test.c @@ -619,7 +619,7 @@ bool task_propogate(const char *curdir) { * We made it here, which concludes the file/directory is not * actually a directory, so it must be a file :) */ - if (strstr(files->d_name, ".tmpl") == &files->d_name[strlen(files->d_name) - (sizeof(".tmpl") - 1)]) { + if (strcmp(files->d_name + strlen(files->d_name) - 5, ".tmpl") == 0) { task_template_t *template = task_template_compile(files->d_name, curdir); char buf[4096]; /* one page should be enough */ task_t task;