Skip to content

Commit

Permalink
Harmonises the syntax of all the null character terminations across t…
Browse files Browse the repository at this point in the history
…he config.h file

#12
  • Loading branch information
phani92 authored Nov 29, 2023
1 parent f5bceae commit e61ccba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cfgpath.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static inline void get_user_config_file(char *out, unsigned int maxlen, const ch
out += appname_len;
memcpy(out, ".conf", ext_len);
out += ext_len;
*out = 0;
*out = '\0';
#elif defined(CFGPATH_WINDOWS)
if (maxlen < MAX_PATH) {
out[0] = 0;
Expand Down Expand Up @@ -243,7 +243,7 @@ static inline void get_user_config_folder(char *out, unsigned int maxlen, const
mkdir(out_orig, 0755);
*out = '/';
out++;
*out = 0;
*out = '\0';
#elif defined(CFGPATH_WINDOWS)
if (maxlen < MAX_PATH) {
out[0] = 0;
Expand Down Expand Up @@ -360,7 +360,7 @@ static inline void get_user_data_folder(char *out, unsigned int maxlen, const ch
mkdir(out_orig, 0755);
*out = '/';
out++;
*out = 0;
*out = '\0';
#elif defined(CFGPATH_WINDOWS) || defined(CFGPATH_MAC)
/* No distinction under Windows or OS X */
get_user_config_folder(out, maxlen, appname);
Expand Down Expand Up @@ -445,7 +445,7 @@ static inline void get_user_cache_folder(char *out, unsigned int maxlen, const c
mkdir(out_orig, 0755);
*out = '/';
out++;
*out = 0;
*out = '\0';
#elif defined(CFGPATH_WINDOWS)
if (maxlen < MAX_PATH) {
out[0] = 0;
Expand Down

0 comments on commit e61ccba

Please sign in to comment.