chiark / gitweb /
[PATCH] evaluate getenv() return value for udev_config.c
authorogasawara@osdl.org <ogasawara@osdl.org>
Sat, 15 May 2004 06:18:46 +0000 (23:18 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:35:47 +0000 (21:35 -0700)
commitc33359307b4a337d6c4f2f4fbe4451544fa5cc1f
tree672e581b2a1d490f6f5fd55e329a8fc4e9a73885
parent28e169f067aa96b406342677922e34e7361a7d1b
[PATCH] evaluate getenv() return value for udev_config.c

Small patch to fix the evaluation logic for the return value of getenv()
in udev_config.c file.  Basically, the actual values for the environment
variables "UDEV_NO_SLEEP" and "UDEV_NO_DEVD" were not being checked.
For example UDEV_NO_SLEEP could have been set to false but the line:

if (getenv("UDEV_NO_SLEEP") != NULL)

in this case would always evaluate to true, since getenv() returns
char*, thus the "udev_sleep" variable would be set incorrectly.  The
patch makes sure to check the value returned by getenv() not just if
getenv() returned a value.  Hope this made sense.  Thanks,
udev_config.c