From 488690c864cf47a23005fd67745f7adc5e7f94ff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 13 Jul 2021 21:21:16 +1000 Subject: Cleanup: minor changes to recent sequencer clipboard addition - Make the variable to store the name 'static'. - Use STRNCPY macro. - Set the first character to nil instead of memset for the while string. --- source/blender/sequencer/intern/clipboard.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/blender/sequencer/intern/clipboard.c b/source/blender/sequencer/intern/clipboard.c index 6c7cdbac7b5..9e702a4e60b 100644 --- a/source/blender/sequencer/intern/clipboard.c +++ b/source/blender/sequencer/intern/clipboard.c @@ -59,7 +59,7 @@ ListBase seqbase_clipboard; int seqbase_clipboard_frame; -char seq_clipboard_active_seq_name[SEQ_NAME_MAXSTR]; +static char seq_clipboard_active_seq_name[SEQ_NAME_MAXSTR]; void seq_clipboard_pointers_free(struct ListBase *seqbase); @@ -187,11 +187,10 @@ void SEQ_clipboard_active_seq_name_store(Scene *scene) { Sequence *active_seq = SEQ_select_active_get(scene); if (active_seq != NULL) { - BLI_strncpy( - seq_clipboard_active_seq_name, active_seq->name, sizeof(seq_clipboard_active_seq_name)); + STRNCPY(seq_clipboard_active_seq_name, active_seq->name); } else { - memset(seq_clipboard_active_seq_name, 0, sizeof(seq_clipboard_active_seq_name)); + seq_clipboard_active_seq_name[0] = '\0'; } } -- cgit v1.2.3