freedreno/afuc: Fix potentially uninitialized variable

../src/freedreno/afuc/emu-ui.c:64:11: warning: ‘p’ may be used uninitialized [-Wmaybe-uninitialized]
64 |    while (*p && isspace(*p))
   |           ^~
../src/freedreno/afuc/emu-ui.c: In function ‘emu_packet_prompt’:
../src/freedreno/afuc/emu-ui.c:459:10: note: ‘p’ was declared here
459 |    char *p;
    |          ^

Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38104>
This commit is contained in:
Karmjit Mahil
2025-10-28 09:52:06 +00:00
committed by Marge Bot
parent cf49571c9e
commit 7f2c53200f
+3 -1
View File
@@ -88,8 +88,10 @@ readline(char **p)
static size_t n;
ssize_t ret = getline(&buf, &n, stdin);
if (ret < 0)
if (ret < 0) {
*p = NULL;
return ret;
}
*p = buf;
return 0;