diff options
author | Campbell Barton <campbell@blender.org> | 2022-10-17 03:16:41 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-10-17 03:16:41 +0300 |
commit | 1d1cade9a9a7f75034669520e39c56959917803a (patch) | |
tree | 92482d85f4199f1f65ebcb4b04b6c2cf4a4a0ea4 /source/blender/blenkernel/intern/blendfile.c | |
parent | 2f3f208901b5bf0fde7fbc9c3f02b66f7591b169 (diff) |
BLI_path: remove trailing NULL argument to BLI_path_join
Using varargs had the disadvantages, replace with a macro which has
some advantages.
- Arguments are type checked.
- Less verbose.
- Unintended NULL arguments would silently terminate joining paths.
- Passing in a NULL argument warns with GCC.
Diffstat (limited to 'source/blender/blenkernel/intern/blendfile.c')
-rw-r--r-- | source/blender/blenkernel/intern/blendfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/blendfile.c b/source/blender/blenkernel/intern/blendfile.c index 6546659f6cd..85a43b7c479 100644 --- a/source/blender/blenkernel/intern/blendfile.c +++ b/source/blender/blenkernel/intern/blendfile.c @@ -737,7 +737,7 @@ bool BKE_blendfile_userdef_write_all(ReportList *reports) if ((cfgdir = BKE_appdir_folder_id_create(BLENDER_USER_CONFIG, NULL))) { bool ok_write; - BLI_path_join(filepath, sizeof(filepath), cfgdir, BLENDER_USERPREF_FILE, NULL); + BLI_path_join(filepath, sizeof(filepath), cfgdir, BLENDER_USERPREF_FILE); printf("Writing userprefs: '%s' ", filepath); if (use_template_userpref) { @@ -764,7 +764,7 @@ bool BKE_blendfile_userdef_write_all(ReportList *reports) if (use_template_userpref) { if ((cfgdir = BKE_appdir_folder_id_create(BLENDER_USER_CONFIG, U.app_template))) { /* Also save app-template prefs */ - BLI_path_join(filepath, sizeof(filepath), cfgdir, BLENDER_USERPREF_FILE, NULL); + BLI_path_join(filepath, sizeof(filepath), cfgdir, BLENDER_USERPREF_FILE); printf("Writing userprefs app-template: '%s' ", filepath); if (BKE_blendfile_userdef_write(filepath, reports) != 0) { |