libxl: don't shadow global "socket" in psr code

SLES11 and OpenSUSE 11.4 complain:

[ 1227s] libxl_psr.c: In function 'libxl_psr_cat_get_l3_info':
[ 1227s] libxl_psr.c:342: error: declaration of 'socket' shadows a > global declaration

Change "socket" to "socketid" to fix the problem.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Chao Peng <chao.p.peng@linux.intel.com>
Tested-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
(cherry picked from commit d776ffe953)
This commit is contained in:
Wei Liu authored and Ian Campbell committed 2015-09-30 16:41:42 +01:00
1 parent d0f27c4bb5
commit a15b47f4ce
1 file changed
+5 -5
+5 -5
View File
@@ -339,7 +339,7 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx, libxl_psr_cat_info **info,
{
GC_INIT(ctx);
int rc;
int i = 0, socket, nr_sockets;
int i = 0, socketid, nr_sockets;
libxl_bitmap socketmap;
libxl_psr_cat_info *ptr;
@@ -360,10 +360,10 @@ int libxl_psr_cat_get_l3_info(libxl_ctx *ctx, libxl_psr_cat_info **info,
ptr = libxl__malloc(NOGC, nr_sockets * sizeof(libxl_psr_cat_info));
libxl_for_each_set_bit(socket, socketmap) {
ptr[i].id = socket;
if (xc_psr_cat_get_l3_info(ctx->xch, socket, &ptr[i].cos_max,
&ptr[i].cbm_len)) {
libxl_for_each_set_bit(socketid, socketmap) {
ptr[i].id = socketid;
if (xc_psr_cat_get_l3_info(ctx->xch, socketid, &ptr[i].cos_max,
&ptr[i].cbm_len)) {
libxl__psr_cat_log_err_msg(gc, errno);
rc = ERROR_FAIL;
free(ptr);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.