Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142322255
D51405.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
825 B
Referenced Files
None
Subscribers
None
D51405.id.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 2:03 PM (20 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27745928
Default Alt Text
D51405.id.diff (825 B)
Attached To
Mode
D51405: tzcode: Fix time zone change detection.
Attached
Detach File
Event Timeline
Log In to Comment