Skip to contentSkip to conversation

apparmor/file: Removing unnecessary initial values for variable pointers

PATCH Superseded Li kunyu 1 participant 1 message Sep 12, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Li kunyu

author
#0 lore raw

PATCH 1/1 apparmor/file: Removing unnecessary initial values for variable pointers

These variable pointers are assigned during use and do not need to be initialized for assignment.

---
 security/apparmor/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
security/apparmor/file.c +2 -2
index 698b124e649f..12eafdf18fc0 100644
@@ -264,7 +264,7 @@ int aa_path_perm(const char *op, struct aa_label *label,
 {
 	struct aa_perms perms = {};
 	struct aa_profile *profile;
-	char *buffer = NULL;
+	char *buffer;
 	int error;
 
 	flags |= PATH_DELEGATE_DELETED | (S_ISDIR(cond->mode) ? PATH_IS_DIR :
@@ -412,7 +412,7 @@ int aa_path_link(struct aa_label *label, struct dentry *old_dentry,
 		d_backing_inode(old_dentry)->i_uid,
 		d_backing_inode(old_dentry)->i_mode
 	};
-	char *buffer = NULL, *buffer2 = NULL;
+	char *buffer, *buffer2;
 	struct aa_profile *profile;
 	int error;
 
Signature · 1 line
2.18.2