Repository: trafficserver Updated Branches: refs/heads/master 77acf4520 -> abcc5f7c9
TS-1475 Fix build errors Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/abcc5f7c Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/abcc5f7c Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/abcc5f7c Branch: refs/heads/master Commit: abcc5f7c99a2e676b85bb9881d5719e0a86a7b03 Parents: 77acf45 Author: Leif Hedstrom <[email protected]> Authored: Tue Jul 15 22:21:59 2014 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Tue Jul 15 22:21:59 2014 -0600 ---------------------------------------------------------------------- plugins/experimental/buffer_upload/buffer_upload.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/abcc5f7c/plugins/experimental/buffer_upload/buffer_upload.cc ---------------------------------------------------------------------- diff --git a/plugins/experimental/buffer_upload/buffer_upload.cc b/plugins/experimental/buffer_upload/buffer_upload.cc index df0f3d8..d7f13e1 100644 --- a/plugins/experimental/buffer_upload/buffer_upload.cc +++ b/plugins/experimental/buffer_upload/buffer_upload.cc @@ -956,11 +956,14 @@ create_directory() while ((d = readdir(dir))) { remove(d->d_name); } - if (chdir("..") == -1) return 0; + closedir(dir); + if (chdir("..") == -1) + return 0; } - closedir(dir); - if (chdir(cwd) == -1) return 0; + if (chdir(cwd) == -1) + return 0; + return 1; error_out: @@ -968,9 +971,10 @@ error_out: value of chdir() and cannot be silenced The reason is the combination of -D_FORTIFY_SOURCE=2 -O */ - if(chdir(cwd) == -1) return 0; - return 0; + if (chdir(cwd) == -1) + return 0; + return 0; } static void
