engines: separate declaration and assignment
authorVincent Fu <vincent.fu@samsung.com>
Sat, 15 Apr 2023 00:51:44 +0000 (00:51 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Thu, 20 Apr 2023 13:43:30 +0000 (09:43 -0400)
commita93259c9d05c69d4d32f2d1ce459e6a960077b17
tree5775876751e759cc64698eb960796176eb99a27e
parenta7b7cb5bc0ebd935c99f06ad852ce4d1b2e88a1b
engines: separate declaration and assignment

Separate the declaraction and assignment for some variables.

This is a prep patch for a Coccinelle script that converts
mallloc+memset(,0,) to calloc.

Part of this patch was created using the Coccinelle script below.

@@
identifier x;
expression y;
statement s;
type T;
@@

-T x = malloc(y);
+T x;
+x = malloc(y);
(
if (!x) s
|
if (x == NULL) s
|
)
memset(x, 0, y);

Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
engines/null.c
engines/posixaio.c
engines/solarisaio.c