diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-13 14:21:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-13 14:23:35 +0300 |
commit | 488690c864cf47a23005fd67745f7adc5e7f94ff (patch) | |
tree | 6efe0cad9f70940e7c631193edcfb235dbf129fe | |
parent | d374469f4c045355b2e5b17d7ba5dae9c979c8c7 (diff) |
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.
-rw-r--r-- | source/blender/sequencer/intern/clipboard.c | 7 |
1 files 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'; } } |