Skip to content

Commit

Permalink
Reduce scope of variable, and make it signed
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Apr 22, 2014
1 parent be95867 commit c800431
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/rlm_ldap/attrmap.c
Expand Up @@ -250,7 +250,6 @@ int rlm_ldap_map_xlat(REQUEST *request, value_pair_map_t const *maps, rlm_ldap_m
{
value_pair_map_t const *map;
unsigned int total = 0;
size_t len;

VALUE_PAIR *found, **from = NULL;
REQUEST *context;
Expand All @@ -259,10 +258,11 @@ int rlm_ldap_map_xlat(REQUEST *request, value_pair_map_t const *maps, rlm_ldap_m
switch (map->src->type) {
case VPT_TYPE_XLAT:
{
ssize_t len;
char *exp = NULL;

len = radius_xlat(exp, 0, request, map->src->name, NULL, NULL);
if (len <= 0) {
if (len < 0) {
RDEBUG("Expansion of LDAP attribute \"%s\" failed", map->src->name);

goto error;
Expand Down

0 comments on commit c800431

Please sign in to comment.