summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-04 11:46:44 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-12 11:44:57 +0200
commit2fe21124a6560fcf1ce3b0a3004baa9bb45d1e0b (patch)
tree35448e5d3a8042bb36bada1fedee63ae24ea7b97 /coccinelle
parentb636d78aeeea584b7828df18cb636693af365e2f (diff)
downloadsystemd-2fe21124a6560fcf1ce3b0a3004baa9bb45d1e0b.tar.gz
Add open_memstream_unlocked() wrapper
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/fopen-unlocked.cocci8
1 files changed, 8 insertions, 0 deletions
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);