On Thu, 7 Dec 2017, Mark Johnston wrote:

Log:
 Ensure that "out" is initialized in all error paths.
...
Modified: head/lib/libefivar/efivar-dp-xlate.c
==============================================================================
--- head/lib/libefivar/efivar-dp-xlate.c        Thu Dec  7 09:05:34 2017        
(r326657)
+++ head/lib/libefivar/efivar-dp-xlate.c        Thu Dec  7 15:16:17 2017        
(r326658)
@@ -529,7 +529,7 @@ build_dp(const char *efimedia, const char *relpath, ef
{
        char *fp, *dptxt = NULL;
        int rv = 0;
-       efidp out;
+       efidp out = NULL;
        size_t len;

        fp = path_to_file_dp(relpath);

This is a worse style of initializations in declararations than usual.
1 initialization in a non-declaration is mixed with many initializations
in declarations, using the C99 misfeature of allowing initialiations
after statements, without even any blank lines to keep the declarations
separate.

Most libefivar code is much uglier than this, with 2-space indentation
and worse.

Bruce
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to