Skip to contentSkip to conversation

memfd_test: Add missing argument to printf()

PATCH Superseded Pranith Kumar 2 participants 2 messages Aug 31, 2014 – Sep 1, 2014 Kselftest

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memfd_test: Add missing argument to printf()

Add a missing path argument buf to printf()

---
 tools/testing/selftests/memfd/memfd_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/memfd/memfd_test.c +1 -1
index 3634c90..c343df8 100644
@@ -205,7 +205,7 @@ static void mfd_fail_open(int fd, int flags, mode_t mode)
 	sprintf(buf, "/proc/self/fd/%d", fd);
 	r = open(buf, flags, mode);
 	if (r >= 0) {
-		printf("open(%s) didn't fail as expected\n");
+		printf("open(%s) didn't fail as expected\n", buf);
 		abort();
 	}
 }
Signature · 1 line
2.1.0
Reviewed-by on v1 1/1
#1 lore raw

Hi

Quoted 3 lines · Pranith Kumar

Add a missing path argument buf to printf()

Looks good:

Thanks
David

Quoted 20 lines
---
 tools/testing/selftests/memfd/memfd_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/memfd/memfd_test.c +1 -2
index 3634c90..c343df8 100644
@@ -205,7 +205,7 @@ static void mfd_fail_open(int fd, int flags, mode_t mode)
        sprintf(buf, "/proc/self/fd/%d", fd);
        r = open(buf, flags, mode);
        if (r >= 0) {
-               printf("open(%s) didn't fail as expected\n");
+               printf("open(%s) didn't fail as expected\n", buf);
                abort();
        }
 }
--

2.1.0