Sfoglia il codice sorgente

libdpkg: Swap memset arguments in string test case

Guillem Jover 16 anni fa
parent
commit
0fbb038805
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      lib/dpkg/test/t-string.c

+ 4 - 4
lib/dpkg/test/t-string.c

@@ -28,22 +28,22 @@ test_str_escape_fmt(void)
 {
 	char buf[1024], *q;
 
-	memset(buf, sizeof(buf), 'a');
+	memset(buf, 'a', sizeof(buf));
 	q = str_escape_fmt(buf, "");
 	strcpy(q, " end");
 	test_str(buf, ==, " end");
 
-	memset(buf, sizeof(buf), 'a');
+	memset(buf, 'a', sizeof(buf));
 	q = str_escape_fmt(buf, "%");
 	strcpy(q, " end");
 	test_str(buf, ==, "%% end");
 
-	memset(buf, sizeof(buf), 'a');
+	memset(buf, 'a', sizeof(buf));
 	q = str_escape_fmt(buf, "%%%");
 	strcpy(q, " end");
 	test_str(buf, ==, "%%%%%% end");
 
-	memset(buf, sizeof(buf), 'a');
+	memset(buf, 'a', sizeof(buf));
 	q = str_escape_fmt(buf, "%b%b%c%c%%");
 	strcpy(q, " end");
 	test_str(buf, ==, "%%b%%b%%c%%c%%%% end");