saltstack/salt — pull request #10695 by otrempe (2014-02-24 16:27:16+00:00)
Title: Fix reg state thinking DWORD value set to 0 exists even if it doesn't.

reg state use

```
if value == __salt__['reg.read_key'](hive, path, key)
```

to verify if a value is registry value is properly set.

If you want to set a DWORD value to 0 and this value doesn't exist, `__salt__['reg.read_key'](hive, path, key)` returns `False` causing the `if` condition being evaluated to True (`0 == False`).

Returning `None` from `__salt__['reg.read_key']` when the value doesn't exist fix the issue.