trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject svn commit: r1212101 - /trafficserver/plugins/trunk/buffer_upload/buffer_upload.cc
Date Thu, 08 Dec 2011 20:37:28 GMT
Author: igalic
Date: Thu Dec  8 20:37:28 2011
New Revision: 1212101

URL: http://svn.apache.org/viewvc?rev=1212101&view=rev
Log:
This is a sad day. Today we capitulate before the machine.

This bug: https://bugs.launchpad.net/glibc/+bug/305176 forces
us to do ugly, ugly, stupid silly workarounds for things the
compiler and the library. I'm sorry.

Modified:
    trafficserver/plugins/trunk/buffer_upload/buffer_upload.cc

Modified: trafficserver/plugins/trunk/buffer_upload/buffer_upload.cc
URL: http://svn.apache.org/viewvc/trafficserver/plugins/trunk/buffer_upload/buffer_upload.cc?rev=1212101&r1=1212100&r2=1212101&view=diff
==============================================================================
--- trafficserver/plugins/trunk/buffer_upload/buffer_upload.cc (original)
+++ trafficserver/plugins/trunk/buffer_upload/buffer_upload.cc Thu Dec  8 20:37:28 2011
@@ -982,14 +982,18 @@ create_directory()
     while ((d = readdir(dir))) {
       remove(d->d_name);
     }
-    chdir("..");
+    if (chdir("..") == -1) return 0;
   }
 
-  chdir(cwd);
+  if (chdir(cwd) == -1) return 0;
   return 1;
 
 error_out:
-  chdir(cwd);
+  /*  Debian's compiler chain complains about not using the return
+      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;
 
 }



Mime
View raw message