projects
/
gnushogi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
8e08526
)
Book: simplify WriteData.
author
Yann Dirson
<ydirson@free.fr>
Fri, 21 Feb 2014 21:20:35 +0000 (22:20 +0100)
committer
Yann Dirson
<ydirson@free.fr>
Sat, 22 Feb 2014 09:46:23 +0000 (10:46 +0100)
gnushogi/book.c
patch
|
blob
|
history
diff --git
a/gnushogi/book.c
b/gnushogi/book.c
index
0e95607
..
cc5630a
100644
(file)
--- a/
gnushogi/book.c
+++ b/
gnushogi/book.c
@@
-598,12
+598,12
@@
static void WriteAdmin(void)
static void WriteData(int *mustwrite)
{
- if (*mustwrite)
- {
- lseek(gfd, currentoffset, SEEK_SET);
- write(gfd, (char *)&DATA, sizeof_gdxdata);
- *mustwrite = false;
- }
+ if (!*mustwrite)
+ return;
+
+ lseek(gfd, currentoffset, SEEK_SET);
+ write(gfd, (char *)&DATA, sizeof_gdxdata);
+ *mustwrite = false;
}
static int ReadAdmin(void)