linux-mips
[Top] [All Lists]

SETNAME (set nodename) in syscall.c

To: ralf@linux-mips.org
Subject: SETNAME (set nodename) in syscall.c
From: "Randy.Dunlap" <rdunlap@xenotime.net>
Date: Sat, 29 Apr 2006 21:01:59 -0700 (PDT)
Cc: linux-mips@linux-mips.org
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hi,

In arch/mips/syscall.c::_sys_sysmips(), case SETNAME,
isn't one of the strncpy() and strlcpy() unneeded?

                down_write(&uts_sem);
                strncpy(system_utsname.nodename, nodename, len);
                nodename[__NEW_UTS_LEN] = '\0';
                strlcpy(system_utsname.nodename, nodename,
                        sizeof(system_utsname.nodename));
                up_write(&uts_sem);


-- 
~Randy

<Prev in Thread] Current Thread [Next in Thread>
  • SETNAME (set nodename) in syscall.c, Randy.Dunlap <=