summaryrefslogtreecommitdiffstats
path: root/cocci/isc_mem_create_never_fail.disabled
diff options
context:
space:
mode:
Diffstat (limited to 'cocci/isc_mem_create_never_fail.disabled')
-rw-r--r--cocci/isc_mem_create_never_fail.disabled95
1 files changed, 95 insertions, 0 deletions
diff --git a/cocci/isc_mem_create_never_fail.disabled b/cocci/isc_mem_create_never_fail.disabled
new file mode 100644
index 0000000..e526506
--- /dev/null
+++ b/cocci/isc_mem_create_never_fail.disabled
@@ -0,0 +1,95 @@
+@@
+statement S;
+expression E;
+@@
+
+- if (isc_mem_create(0, 0, E) != ISC_R_SUCCESS) S;
++ isc_mem_create(E);
+
+@@
+statement S;
+expression V, E;
+@@
+
+- V = isc_mem_create(0, 0, E);
+- if (V == ISC_R_SUCCESS) S
++ isc_mem_create(E);
++ S
+
+
+@@
+statement S;
+expression V, E;
+@@
+
+- V = isc_mem_create(0, 0, E);
+- if (V != ISC_R_SUCCESS) S
++ isc_mem_create(E);
+
+@@
+expression V, E;
+@@
+
+- V = isc_mem_create(0, 0, E);
+- check_result(V, ...);
++ isc_mem_create(E);
+
+@@
+statement S;
+expression V, E, C;
+@@
+
+- if (C) { V = isc_mem_create(0, 0, E); }
+- if (V != ISC_R_SUCCESS) S
++ if (C) { isc_mem_create(E); }
+
+@@
+expression E;
+@@
+
+- RUNTIME_CHECK(isc_mem_create(0, 0, E) == ISC_R_SUCCESS);
++ isc_mem_create(E);
+
+@@
+expression E;
+@@
+
+- RUNCHECK(isc_mem_create(0, 0, E));
++ isc_mem_create(E);
+
+@@
+expression E;
+@@
+
+- CHECK(isc_mem_create(0, 0, E), ...);
++ isc_mem_create(E);
+
+@@
+expression E;
+@@
+
+- CHECK(isc_mem_create(0, 0, E));
++ isc_mem_create(E);
+
+@@
+expression V, E;
+@@
+
+- V = isc_mem_create(0, 0, E);
+- assert_int_equal(V, ISC_R_SUCCESS);
++ isc_mem_create(E);
+
+@@
+expression E;
+statement S;
+@@
+
+- if (isc_mem_create(0, 0, E) != ISC_R_SUCCESS) S
++ isc_mem_create(E);
+
+@@
+expression E;
+@@
+
+- DO(..., isc_mem_create(0, 0, E));
++ isc_mem_create(E);