fuser: Fix skipping "SIG" on signal names (-s).

The code did  !strncasecmp(str, "sig", 4)  which is not useful.

Also change "sig" to "SIG" matching the uppercase signal names as of
r218285. This has little effect because fuser does not enable locale.
This commit is contained in:
Jilles Tjoelker 2011-06-18 21:53:36 +00:00
parent b0766d1fc5
commit 1696274411
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=223271

View File

@ -358,9 +358,8 @@ str2sig(const char *str)
{
int i;
#define SIGPREFIX "sig"
if (!strncasecmp(str, SIGPREFIX, sizeof(SIGPREFIX)))
str += sizeof(SIGPREFIX);
if (!strncasecmp(str, "SIG", 3))
str += 3;
for (i = 1; i < sys_nsig; i++) {
if (!strcasecmp(sys_signame[i], str))
return (i);