~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/intern/property.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
void BKE_bproperty_free_list(ListBase *lb)
60
60
{
61
61
        bProperty *prop;
62
 
        
63
 
        while ( (prop = lb->first) ) {
64
 
                BLI_remlink(lb, prop);
 
62
 
 
63
        while ((prop = BLI_pophead(lb))) {
65
64
                BKE_bproperty_free(prop);
66
65
        }
67
66
}
177
176
                        i = 0;
178
177
 
179
178
                        do { /* ensure we have enough chars for the new number in the name */
180
 
                                BLI_snprintf(num, sizeof(num), "%d", i++);
181
 
                                BLI_strncpy(new_name, base_name, sizeof(prop->name) - strlen(num));
182
 
                                strcat(new_name, num);
 
179
                                const size_t num_len = BLI_snprintf(num, sizeof(num), "%d", i++);
 
180
                                BLI_snprintf(new_name, sizeof(prop->name),
 
181
                                             "%.*s%s", (int)(sizeof(prop->name) - num_len), base_name, num);
183
182
                        } while (bproperty_get(first, prop, new_name));
184
183
 
185
184
                        BLI_strncpy(prop->name, new_name, sizeof(prop->name));