Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d797093c authored by Jordan Crouse's avatar Jordan Crouse
Browse files

misc: Remove VLA from uid_sys_stats.c



get_full_task_comm() uses a stack VLA in theory but it
isn't really a thing because the size is calculated immediately
before and is constant. I wish the compiler was smart enough
to realize that, but it isn't.

Change-Id: Ic0dedbad933046c920626aeabeed5e1acd885752
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent a8f72690
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ static void get_full_task_comm(struct task_entry *task_entry,
	int i = 0, offset = 0, len = 0;
	/* save one byte for terminating null character */
	int unused_len = MAX_TASK_COMM_LEN - TASK_COMM_LEN - 1;
	char buf[unused_len];
	char buf[MAX_TASK_COMM_LEN - TASK_COMM_LEN - 1];
	struct mm_struct *mm = task->mm;

	/* fill the first TASK_COMM_LEN bytes with thread name */