From 2fe21124a6560fcf1ce3b0a3004baa9bb45d1e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 4 Apr 2019 11:46:44 +0200 Subject: Add open_memstream_unlocked() wrapper --- coccinelle/fopen-unlocked.cocci | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'coccinelle') diff --git a/coccinelle/fopen-unlocked.cocci b/coccinelle/fopen-unlocked.cocci index bbd70a6338..7870f8ccea 100644 --- a/coccinelle/fopen-unlocked.cocci +++ b/coccinelle/fopen-unlocked.cocci @@ -61,3 +61,11 @@ expression f, fd, options; + return r; } - (void) __fsetlocking(f, FSETLOCKING_BYCALLER); +@@ +expression f, buf, sz; +@@ +- f = open_memstream(&buf, &sz); ++ f = open_memstream_unlocked(&buf, &sz); + if (!f) + return ...; +- (void) __fsetlocking(f, FSETLOCKING_BYCALLER); -- cgit v1.2.1