X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftest-c-strstr.c;h=2bd0cf0d47bbb80021fed673c3a8d7a4ba9ec093;hb=4754ac9d681d36e16e92a1b08efb1d334d7b3829;hp=75b8d5d553f40f5450ac9ef9fa4fba82b5fd4df6;hpb=57fdfd3f8ec62b105c53bcdf6f127c35c7fe7391;p=gnulib.git diff --git a/tests/test-c-strstr.c b/tests/test-c-strstr.c index 75b8d5d55..2bd0cf0d4 100644 --- a/tests/test-c-strstr.c +++ b/tests/test-c-strstr.c @@ -1,5 +1,5 @@ /* Test of searching in a string. - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,6 +30,7 @@ if (!(expr)) \ { \ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + fflush (stderr); \ abort (); \ } \ } \ @@ -129,10 +130,8 @@ main () result = c_strstr (haystack, needle); ASSERT (result == haystack + m); } - if (needle != NULL) - free (needle); - if (haystack != NULL) - free (haystack); + free (needle); + free (haystack); } return 0;