Skip to content

Commit

Permalink
Silence GCC warnings about possibly uninitialized blob values
Browse files Browse the repository at this point in the history
In fact, the blob is always initialized when get_attr_blob() returns
KDUMP_OK, but the C compiler is not smart enough to know, but it is a bad
habit to ignore compiler warnings. An unnecessary NULL initialization is
definitely cheaper. ;-)

Signed-off-by: Petr Tesarik <[email protected]>
  • Loading branch information
ptesarik committed Dec 1, 2024
1 parent 9646696 commit 32f5903
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kdumpfile/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ derived_attr_revalidate(kdump_ctx_t *ctx, struct attr_data *attr,
const struct attr_template *tmpl)
{
const struct derived_attr_def *def = attr_to_derived_def(attr);
kdump_blob_t *blob;
kdump_blob_t *blob = NULL;
kdump_status status;
void *ptr;

Expand Down Expand Up @@ -1122,7 +1122,7 @@ derived_attr_update(kdump_ctx_t *ctx, struct attr_data *attr,
const struct attr_template *tmpl)
{
const struct derived_attr_def *def = attr_to_derived_def(attr);
kdump_blob_t *blob;
kdump_blob_t *blob = NULL;
kdump_status status;
void *ptr;

Expand Down

0 comments on commit 32f5903

Please sign in to comment.