Skip to content

Commit 18b26bf

Browse files
committed
Change prefixes from char[] to char*
1 parent d01fc57 commit 18b26bf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/stats.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static void extract_named_version(
100100

101101
void fastfetch(char buf[static STATS_VERSION_SIZE]) {
102102
// NOTE Version in the format "fastfetch x.x.x (ARCH)"
103-
const char prefix[] = "fastfetch ";
103+
const char *prefix = "fastfetch ";
104104
char tmp[STATS_VERSION_SIZE];
105105
app_version("fastfetch --version", tmp);
106106
extract_named_version(tmp, prefix, buf);
@@ -110,47 +110,47 @@ static void fetchfetch(char buf[static STATS_VERSION_SIZE]) { strcpy(buf, versio
110110

111111
void hyfetch(char buf[static STATS_VERSION_SIZE]) {
112112
// NOTE Version in the format "Version: x.x.x"
113-
const char prefix[] = "Version: ";
113+
const char *prefix = "Version: ";
114114
char tmp[STATS_VERSION_SIZE];
115115
app_version("hyfetch --version", tmp);
116116
extract_named_version(tmp, prefix, buf);
117117
}
118118

119119
void neofetch(char buf[static STATS_VERSION_SIZE]) {
120120
// NOTE Version in the format "Neofetch x.x.x"
121-
const char prefix[] = "Neofetch ";
121+
const char *prefix = "Neofetch ";
122122
char tmp[STATS_VERSION_SIZE];
123123
app_version("neofetch --version", tmp);
124124
extract_named_version(tmp, prefix, buf);
125125
}
126126

127127
void onefetch(char buf[static STATS_VERSION_SIZE]) {
128128
// NOTE Version in the format "onefetch x.x.x"
129-
const char prefix[] = "onefetch ";
129+
const char *prefix = "onefetch ";
130130
char tmp[STATS_VERSION_SIZE];
131131
app_version("onefetch --version", tmp);
132132
extract_named_version(tmp, prefix, buf);
133133
}
134134

135135
void pfetch(char buf[static STATS_VERSION_SIZE]) {
136136
// NOTE Version in the format "pfetch x.x.x"
137-
const char prefix[] = "pfetch ";
137+
const char *prefix = "pfetch ";
138138
char tmp[STATS_VERSION_SIZE];
139139
app_version("pfetch --version", tmp);
140140
extract_named_version(tmp, prefix, buf);
141141
}
142142

143143
void screenfetch(char buf[static STATS_VERSION_SIZE]) {
144144
// NOTE Version in the format "screenFetch - Version x.x.x"
145-
const char prefix[] = "\e[4mscreenFetch\e[0m - Version ";
145+
const char *prefix = "\e[4mscreenFetch\e[0m - Version ";
146146
char tmp[STATS_VERSION_SIZE];
147147
app_version("screenfetch --version", tmp);
148148
extract_named_version(tmp, prefix, buf);
149149
}
150150

151151
void uwufetch(char buf[static STATS_VERSION_SIZE]) {
152152
// NOTE Version in the format "UwUfetch version x.x"
153-
const char prefix[] = "UwUfetch version ";
153+
const char *prefix = "UwUfetch version ";
154154
char tmp[STATS_VERSION_SIZE];
155155
app_version("uwufetch --version", tmp);
156156
extract_named_version(tmp, prefix, buf);

0 commit comments

Comments
 (0)