DAFS: variable declarations in C must be a top of block
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 12 Jul 2010 18:42:12 +0000 (14:42 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Tue, 13 Jul 2010 13:44:42 +0000 (06:44 -0700)
Two instances of variable declarations not being present
at the top of a code block in src/vol/volume.c when building
with AFS_DEMAND_ATTACH_FS.  Fix them.

Change-Id: Ic6b9c5a6bbbd8355a144fea38a6ca1dd2a2c747d
Reviewed-on: http://gerrit.openafs.org/2388
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/vol/volume.c

index 26327eb..a8baa1a 100644 (file)
@@ -836,14 +836,15 @@ VInitAttachVolumes(ProgramType pt)
         /* create threads to scan disk partitions. */
        for (i=0; i < threads; i++) {
            struct vinitvolumepackage_thread_param *params;
-           params = (struct vinitvolumepackage_thread_param *)malloc(sizeof(struct vinitvolumepackage_thread_param));
+            AFS_SIGSET_DECL;
+
+            params = (struct vinitvolumepackage_thread_param *)malloc(sizeof(struct vinitvolumepackage_thread_param));
             assert(params);
             params->pq = &pq;
             params->vq = &vq;
             params->nthreads = threads;
             params->thread = i+1;
 
-            AFS_SIGSET_DECL;
             AFS_SIGSET_CLEAR();
            assert(pthread_create (&tid, &attrs, &VInitVolumePackageThread, (void*)params) == 0);
             AFS_SIGSET_RESTORE();
@@ -8451,9 +8452,10 @@ VPrintExtendedCacheStats_r(int flags)
     /* print extended VLRU statistics */
     if (VVLRUExtStats_r(&vlru_stats, vol_sum) == 0) {
        afs_uint32 idx, cur, lpos;
-       VOL_UNLOCK;
        VolumeId line[5];
 
+        VOL_UNLOCK;
+
        Log("VLRU State Dump:\n\n");
 
        for (idx = VLRU_QUEUE_NEW; idx < VLRU_QUEUE_INVALID; idx++) {