| 1 |
Description: Fix code in source |
| 2 |
Fix code that probably is never run since the existing code is totally bogus. |
| 3 |
The condition, !open(...), will almost always be true. (sole exception is |
| 4 |
when starting a program with stdin initially closed) |
| 5 |
|
| 6 |
Forwarded: no |
| 7 |
Author: Jim Meyering <[email protected]> |
| 8 |
Last-Update: Mon, 20 Jul 2009 21:05:44 +0200 |
| 9 |
|
| 10 |
--- a/ntreg.c |
| 11 |
+++ b/ntreg.c |
| 12 |
@@ -4133,7 +4133,7 @@ |
| 13 |
if ( !(hdesc->state & HMODE_DIRTY)) return(0); |
| 14 |
|
| 15 |
if ( !(hdesc->state & HMODE_OPEN)) { /* File has been closed */ |
| 16 |
|
| 17 |
+ if ((hdesc->filedesc = open(hdesc->filename,O_RDWR)) < 0) { |
| 18 |
fprintf(stderr,"writeHive: open(%s) failed: %s, FILE NOT WRITTEN!\n",hdesc->filename,strerror(errno)); |
| 19 |
return(1); |
| 20 |
} |