Cleanup: remove redundant string formatting
This commit is contained in:
parent
1152a437e0
commit
c756d08b4a
@ -1730,7 +1730,7 @@ static void stampdata_from_template(StampData *stamp_data,
|
||||
stamp_data->file[0] = '\0';
|
||||
}
|
||||
if (scene->r.stamp & R_STAMP_NOTE) {
|
||||
SNPRINTF(stamp_data->note, "%s", stamp_data_template->note);
|
||||
STRNCPY(stamp_data->note, stamp_data_template->note);
|
||||
}
|
||||
else {
|
||||
stamp_data->note[0] = '\0';
|
||||
|
@ -800,7 +800,7 @@ static uiTooltipData *ui_tooltip_data_from_button_or_extra_icon(bContext *C,
|
||||
.style = UI_TIP_STYLE_HEADER,
|
||||
.color_id = UI_TIP_LC_NORMAL,
|
||||
});
|
||||
field->text = BLI_sprintfN("%s", but_label.strinfo);
|
||||
field->text = BLI_strdup(but_label.strinfo);
|
||||
}
|
||||
|
||||
/* Tip */
|
||||
|
@ -669,7 +669,7 @@ GPUMaterial *GPU_material_from_nodetree(Scene *scene,
|
||||
BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "GPUNodeGraph.used_libraries");
|
||||
mat->refcount = 1;
|
||||
#ifndef NDEBUG
|
||||
BLI_snprintf(mat->name, sizeof(mat->name), "%s", name);
|
||||
STRNCPY(mat->name, name);
|
||||
#else
|
||||
UNUSED_VARS(name);
|
||||
#endif
|
||||
|
@ -6108,7 +6108,7 @@ char *RNA_path_struct_property_py(PointerRNA *ptr, PropertyRNA *prop, int index)
|
||||
}
|
||||
|
||||
if ((index == -1) || (RNA_property_array_check(prop) == false)) {
|
||||
ret = BLI_sprintfN("%s", data_path);
|
||||
ret = BLI_strdup(data_path);
|
||||
}
|
||||
else {
|
||||
ret = BLI_sprintfN("%s[%d]", data_path, index);
|
||||
|
Loading…
Reference in New Issue
Block a user