Page MenuHomeFreeBSD

D51405.id.diff
No OneTemporary

D51405.id.diff

diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c
--- a/contrib/tzcode/localtime.c
+++ b/contrib/tzcode/localtime.c
@@ -408,10 +408,8 @@
static char old_name[PATH_MAX];
static struct stat old_sb;
struct stat sb;
- int error;
- error = stat(name, &sb);
- if (error != 0)
+ if (stat(name, &sb) != 0)
return -1;
if (strcmp(name, old_name) != 0) {
@@ -510,13 +508,11 @@
* 'doextend' to ignore TZDEFRULES; the change_in_tz()
* function can only keep state for a single file.
*/
- int ret = change_in_tz(name);
- if (ret <= 0) {
- /*
- * Returns an errno value if there was an error,
- * and 0 if the timezone had not changed.
- */
+ switch (change_in_tz(name)) {
+ case -1:
return errno;
+ case 0:
+ return 0;
}
}
fid = _open(name, O_RDONLY | O_BINARY);

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 19, 3:32 PM (21 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27745928
Default Alt Text
D51405.id.diff (825 B)

Event Timeline