mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
uname() return value checking fixes.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@508 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
bf77ffaa21
commit
aec85e1dbd
@ -610,7 +610,7 @@ static char *expando_sysname(void *server, void *item, int *free_ret)
|
|||||||
{
|
{
|
||||||
struct utsname un;
|
struct utsname un;
|
||||||
|
|
||||||
if (uname(&un) != 0)
|
if (uname(&un) == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
*free_ret = TRUE;
|
*free_ret = TRUE;
|
||||||
@ -623,7 +623,7 @@ static char *expando_sysrelease(void *server, void *item, int *free_ret)
|
|||||||
{
|
{
|
||||||
struct utsname un;
|
struct utsname un;
|
||||||
|
|
||||||
if (uname(&un) != 0)
|
if (uname(&un) == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
*free_ret = TRUE;
|
*free_ret = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user