Mercurial > masqmail
comparison src/dotlock.c @ 366:41958685480d
Switched to `type *name' style
Andrew Koenig's ``C Traps and Pitfalls'' (Ch.2.1) convinced
me that it is best to go with the way C had been designed.
The ``declaration reflects use'' concept conflicts with a
``type* name'' notation. Hence I switched.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 22 Sep 2011 15:07:40 +0200 |
parents | 26e34ae9a3e3 |
children | b27f66555ba8 |
comparison
equal
deleted
inserted
replaced
365:934a223e4ee8 | 366:41958685480d |
---|---|
28 | 28 |
29 #include "masqmail.h" | 29 #include "masqmail.h" |
30 #include "dotlock.h" | 30 #include "dotlock.h" |
31 | 31 |
32 gboolean | 32 gboolean |
33 dot_lock(gchar * lock_name, gchar * hitch_name) | 33 dot_lock(gchar *lock_name, gchar *hitch_name) |
34 { | 34 { |
35 gboolean ok = FALSE; | 35 gboolean ok = FALSE; |
36 int fd; | 36 int fd; |
37 | 37 |
38 fd = open(hitch_name, O_WRONLY | O_CREAT | O_EXCL, 0); | 38 fd = open(hitch_name, O_WRONLY | O_CREAT | O_EXCL, 0); |
70 | 70 |
71 return ok; | 71 return ok; |
72 } | 72 } |
73 | 73 |
74 gboolean | 74 gboolean |
75 dot_unlock(gchar * lock_name) | 75 dot_unlock(gchar *lock_name) |
76 { | 76 { |
77 unlink(lock_name); | 77 unlink(lock_name); |
78 | 78 |
79 return TRUE; | 79 return TRUE; |
80 } | 80 } |