~ubuntu-branches/ubuntu/saucy/glusterfs/saucy

« back to all changes in this revision

Viewing changes to libglusterfs/src/dict.c

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi, Louis Zuckerman, Patrick Matthäi
  • Date: 2012-01-07 14:19:57 UTC
  • mfrom: (1.3.14)
  • Revision ID: package-import@ubuntu.com-20120107141957-532c9ubquvlmzls5
Tags: 3.2.5-1
[ Louis Zuckerman ]
* Add patch (03) to fix build errors

[ Patrick Matthäi ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1247
1247
        return new;
1248
1248
}
1249
1249
 
 
1250
static void
 
1251
_remove (dict_t *dict,
 
1252
         char *key,
 
1253
         data_t *value,
 
1254
         void *unused)
 
1255
{
 
1256
        dict_del ((dict_t *)dict, key);
 
1257
}
 
1258
 
 
1259
int
 
1260
dict_reset (dict_t *dict)
 
1261
{
 
1262
        int32_t         ret = -1;
 
1263
        if (!dict) {
 
1264
                gf_log_callingfn ("dict", GF_LOG_WARNING, "dict is NULL");
 
1265
                goto out;
 
1266
        }
 
1267
        dict_foreach (dict, _remove, NULL);
 
1268
        ret = 0;
 
1269
out:
 
1270
        return ret;
 
1271
}
1250
1272
/*
1251
1273
 * !!!!!!! CLEANED UP CODE !!!!!!!
1252
1274
 */