File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -757,7 +757,7 @@ char *kv_keymatch(const char *kv, const char *key)
757757static size_t read_file (const char * fname , char * buffer , size_t * bufsz )
758758{
759759 char * p ;
760- _cleanup_file_ FILE * file ;
760+ _cleanup_file_ FILE * file = NULL ;
761761 size_t len ;
762762
763763 file = fopen (fname , "re" );
@@ -806,7 +806,7 @@ size_t get_entity_name(char *buffer, size_t bufsz)
806806
807807size_t get_entity_version (char * buffer , size_t bufsz )
808808{
809- _cleanup_file_ FILE * file ;
809+ _cleanup_file_ FILE * file = NULL ;
810810 size_t num_bytes = 0 ;
811811
812812 /* /proc/sys/kernel/ostype typically contains the string "Linux" */
@@ -928,7 +928,7 @@ int nvme_uuid_from_string(const char *str, unsigned char uuid[NVME_UUID_LEN])
928928
929929int nvme_uuid_random (unsigned char uuid [NVME_UUID_LEN ])
930930{
931- _cleanup_fd_ int f ;
931+ _cleanup_fd_ int f = -1 ;
932932 ssize_t n ;
933933
934934 f = open ("/dev/urandom" , O_RDONLY );
You can’t perform that action at this time.
0 commit comments