 
     KeyType *key = NULL;
     ValueType *value = NULL;
+
     if (util::GRError((retval = cudaMalloc(
       &key, sizeof(KeyType)*num_elements)),
       "CUBRadixSort key malloc failed",
       __FILE__, __LINE__)) return retval;
     if (d_value)
+    {
       if (util::GRError((retval = cudaMalloc(
         &value, sizeof(ValueType)*num_elements)),
         "CUBRadixSort value malloc failed",
         __FILE__, __LINE__)) return retval;
+    }
 
     cub::DoubleBuffer<KeyType>   key_buffer(d_key, key);
     cub::DoubleBuffer<ValueType> value_buffer(d_value, value);

// Local Variables:
// mode:c++
// c-file-style: "NVIDIA"
// End:
    if (util::GRError((retval = cudaFree(key)),
      "CUB Radixsort free key failed",
      __FILE__, __LINE__)) return retval;
    if (d_value)
    {
	if (util::GRError((retval = cudaFree(value)),
	    "CUB Radixsort free value failed",
	    __FILE__, __LINE__)) return retval;
    }

    return retval;
  }
