ethumb: Fix shadow warnings

SVN revision: 62564
This commit is contained in:
Sebastian Dransfeld 2011-08-18 10:59:49 +00:00
parent 08559f2c8b
commit 04bff41881
1 changed files with 21 additions and 21 deletions

View File

@ -184,15 +184,15 @@ static int
_ec_op_new(struct _Ethumbd_Child *ec) _ec_op_new(struct _Ethumbd_Child *ec)
{ {
int r; int r;
int index; int idx;
r = _ec_read_safe(STDIN_FILENO, &index, sizeof(index)); r = _ec_read_safe(STDIN_FILENO, &idx, sizeof(idx));
if (!r) if (!r)
return 0; return 0;
DBG("ethumbd new(). index = %d", index); DBG("ethumbd new(). idx = %d", idx);
ec->ethumbt[index] = ethumb_new(); ec->ethumbt[idx] = ethumb_new();
return 1; return 1;
} }
@ -200,16 +200,16 @@ static int
_ec_op_del(struct _Ethumbd_Child *ec) _ec_op_del(struct _Ethumbd_Child *ec)
{ {
int r; int r;
int index; int idx;
r = _ec_read_safe(STDIN_FILENO, &index, sizeof(index)); r = _ec_read_safe(STDIN_FILENO, &idx, sizeof(idx));
if (!r) if (!r)
return 0; return 0;
DBG("ethumbd del(). index = %d", index); DBG("ethumbd del(). idx = %d", idx);
ethumb_free(ec->ethumbt[index]); ethumb_free(ec->ethumbt[idx]);
ec->ethumbt[index] = NULL; ec->ethumbt[idx] = NULL;
return 1; return 1;
} }
@ -248,11 +248,11 @@ _ec_op_generated_cb(void *data __UNUSED__, Ethumb *e, Eina_Bool success)
static int static int
_ec_op_generate(struct _Ethumbd_Child *ec) _ec_op_generate(struct _Ethumbd_Child *ec)
{ {
int index; int idx;
char *path, *key, *thumb_path, *thumb_key; char *path, *key, *thumb_path, *thumb_key;
int r; int r;
r = _ec_read_safe(STDIN_FILENO, &index, sizeof(index)); r = _ec_read_safe(STDIN_FILENO, &idx, sizeof(idx));
if (!r) if (!r)
return 0; return 0;
@ -269,16 +269,16 @@ _ec_op_generate(struct _Ethumbd_Child *ec)
if (!r) if (!r)
return 0; return 0;
ethumb_file_set(ec->ethumbt[index], path, key); ethumb_file_set(ec->ethumbt[idx], path, key);
ethumb_thumb_path_set(ec->ethumbt[index], thumb_path, thumb_key); ethumb_thumb_path_set(ec->ethumbt[idx], thumb_path, thumb_key);
if (ethumb_exists(ec->ethumbt[index])) if (ethumb_exists(ec->ethumbt[idx]))
{ {
_ec_op_generated_cb(ec, ec->ethumbt[index], EINA_TRUE); _ec_op_generated_cb(ec, ec->ethumbt[idx], EINA_TRUE);
} }
else else
{ {
ethumb_generate(ec->ethumbt[index], _ec_op_generated_cb, ec, NULL); ethumb_generate(ec->ethumbt[idx], _ec_op_generated_cb, ec, NULL);
} }
free(path); free(path);
@ -577,11 +577,11 @@ _ec_document_page_set(struct _Ethumbd_Child *ec __UNUSED__, Ethumb *e)
} }
static void static void
_ec_setup_process(struct _Ethumbd_Child *ec, int index, int type) _ec_setup_process(struct _Ethumbd_Child *ec, int idx, int type)
{ {
Ethumb *e; Ethumb *e;
e = ec->ethumbt[index]; e = ec->ethumbt[idx];
switch (type) switch (type)
{ {
@ -645,10 +645,10 @@ static int
_ec_op_setup(struct _Ethumbd_Child *ec) _ec_op_setup(struct _Ethumbd_Child *ec)
{ {
int r; int r;
int index; int idx;
int type; int type;
r = _ec_read_safe(STDIN_FILENO, &index, sizeof(index)); r = _ec_read_safe(STDIN_FILENO, &idx, sizeof(idx));
if (!r) if (!r)
return 0; return 0;
@ -657,7 +657,7 @@ _ec_op_setup(struct _Ethumbd_Child *ec)
return 0; return 0;
while (type != ETHUMBD_SETUP_FINISHED) while (type != ETHUMBD_SETUP_FINISHED)
{ {
_ec_setup_process(ec, index, type); _ec_setup_process(ec, idx, type);
r = _ec_read_safe(STDIN_FILENO, &type, sizeof(type)); r = _ec_read_safe(STDIN_FILENO, &type, sizeof(type));
if (!r) if (!r)
return 0; return 0;