]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-util: don't mix declarations and code
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Tue, 7 Apr 2015 18:28:27 +0000 (20:28 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Tue, 7 Apr 2015 18:54:23 +0000 (20:54 +0200)
src/test/test-util.c

index aaf25f88bb17f93bbe4f7fc44f3f04b161de449d..052e292a6c6e70ced1e59c7fdab8b9db6356f986 100644 (file)
@@ -416,10 +416,10 @@ static void test_cescape(void) {
 
 static void test_cunescape(void) {
         _cleanup_free_ char *unescaped;
+        const char *x = "abc\\\"\b\f\a\n\r\t\v\003\177\234\313\\000\\x00";
 
         assert_se(cunescape("abc\\\\\\\"\\b\\f\\a\\n\\r\\t\\v\\003\\177\\234\\313\\000\\x00", 0, &unescaped) < 0);
         assert_se(cunescape("abc\\\\\\\"\\b\\f\\a\\n\\r\\t\\v\\003\\177\\234\\313\\000\\x00", UNESCAPE_RELAX, &unescaped) >= 0);
-        const char *x = "abc\\\"\b\f\a\n\r\t\v\003\177\234\313\\000\\x00";
         assert_se(streq_ptr(unescaped, x));
         free(unescaped);
         unescaped = NULL;