
char \*get\_task\_comm(char \*buf, struct task\_struct \*tsk) { /\* buf must be at least sizeof(tsk->comm) in size \*/ task\_lock(tsk); strncpy(buf, tsk->comm, sizeof(tsk->comm)); task\_unlock(tsk); return buf; }fs/exec.c: In function ‘get\_task\_comm’: fs/exec.c:1069:39: warning: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of..
공부한거/OS
2025. 2. 14. 22:06