Daichi Kawahata wrote:
> +#elif defined (HAS_GETINVENT) && defined (__sgi__)

Is the dependence on __sgi__ necessary? Otherwise, I'd rather omit it
because using the operating system to decide about support of certain
features is usually the wrong way.

> +       inventory_t *inv;
> +       glong physmem = 0;
> +
> +       setinvent();

The return code of setinvent() should be checked.

> +       if ((glong) -1 == physmem && 0 != errno)

The check for errno here is unnecessary but you might want to
initialize to zero before calling getinvent().

> +               g_warning(
> +                       "settings_getphysmemsize: getinvent() for INV_MEMORY 
> faild: %s",
> +                       g_strerror(errno));

You should return here in case of an error, because

> +       return physmem * 1024;

-1 * 1024 is implicitely converted to an huge unsigned value.

-- 
Christian

Attachment: pgpS6SdvzoByQ.pgp
Description: PGP signature

Reply via email to