]> granicus.if.org Git - apache/commitdiff
repos.c: In function `dav_fs_copymove_file':
authorAndré Malo <nd@apache.org>
Sun, 14 Mar 2004 16:13:20 +0000 (16:13 +0000)
committerAndré Malo <nd@apache.org>
Sun, 14 Mar 2004 16:13:20 +0000 (16:13 +0000)
repos.c:315: warning: `perms' might be used uninitialized in this function

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102953 13f79535-47bb-0310-9956-ffa450edef68

modules/dav/fs/repos.c

index 01dc4f87f12338cdb0afe6f112b03fc3e6bca1a1..fa28d0521ccd029bb0904a40e7768871144df866 100644 (file)
@@ -320,15 +320,14 @@ static dav_error * dav_fs_copymove_file(
     /* Determine permissions to use for destination */
     if (src_finfo && src_finfo->valid & APR_FINFO_PROT
         && src_finfo->protection & APR_UEXECUTE) {
+        perms = src_finfo->protection;
+
         if (dst_finfo != NULL) {
             /* chmod it if it already exist */
-            if (apr_file_perms_set(dst, src_finfo->protection)) {
+            if (apr_file_perms_set(dst, perms)) {
                 return dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0,
                                      "Could not set permissions on destination");
             }
-        } 
-        else {
-            perms = src_finfo->protection;
         }
     } 
     else {