tools/mksyscall: Fix warning: '__builtin_strncpy' specified bound 256 equals destination size

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-07-20 17:46:03 +08:00 committed by Abdelatif Guettouche
parent b329e2377d
commit 5ce84693d3

View File

@ -158,7 +158,7 @@ static void get_fieldname(const char *arg, char *fieldname)
*/
pstart++;
strncpy(fieldname, pstart, MAX_PARMSIZE);
strncpy(fieldname, pstart, MAX_PARMSIZE - 1);
return;
}
}