[BACK]Return to sethostid.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / compat-43

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/compat-43/sethostid.c between version 1.6 and 1.7

version 1.6, 2003/08/07 16:42:39 version 1.7, 2004/04/19 13:16:42
Line 46  __RCSID("$NetBSD$");
Line 46  __RCSID("$NetBSD$");
 int  int
 sethostid(long hostid)  sethostid(long hostid)
 {  {
         int mib[2];          int mib[2], value;
   
         mib[0] = CTL_KERN;          mib[0] = CTL_KERN;
         mib[1] = KERN_HOSTID;          mib[1] = KERN_HOSTID;
         if (sysctl(mib, 2, NULL, NULL, &hostid, sizeof hostid) == -1)          value = (int)hostid;
           if (sysctl(mib, 2, NULL, NULL, &value, sizeof(value)) == -1)
                 return (-1);                  return (-1);
         return (0);          return (0);
 }  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

CVSweb <webmaster@jp.NetBSD.org>