@@ -126,21 +126,17 @@ char *screenfetch() {
126126 return extract_named_version (out , "[4mscreenFetch[0m - Version " );
127127}
128128
129- void get_stats (FetchStat stats [STATS_SIZE ]) {
130- stats [0 ].label = "Fastfetch" ;
131- stats [0 ].version = fastfetch ();
132- stats [1 ].label = "fetchfetch" ;
133- stats [1 ].version = version ;
134- stats [2 ].label = "hyfetch" ;
135- stats [2 ].version = hyfetch ();
136- stats [3 ].label = "Neofetch" ;
137- stats [3 ].version = neofetch ();
138- stats [4 ].label = "onefetch" ;
139- stats [4 ].version = onefetch ();
140- stats [5 ].label = "pfetch" ;
141- stats [5 ].version = pfetch ();
142- stats [6 ].label = "UwUfetch" ;
143- stats [6 ].version = uwufetch ();
144- stats [7 ].label = "screenFetch" ;
145- stats [7 ].version = screenfetch ();
129+ void get_stats (FetchStat stats [static STATS_SIZE ]) {
130+ const FetchStat data [STATS_SIZE ] = {
131+ {.label = "Fastfetch" , .version = fastfetch ()},
132+ {.label = "fetchfetch" , .version = version },
133+ {.label = "hyfetch" , .version = hyfetch ()},
134+ {.label = "Neofetch" , .version = neofetch ()},
135+ {.label = "onefetch" , .version = onefetch ()},
136+ {.label = "pfetch" , .version = pfetch ()},
137+ {.label = "UwUfetch" , .version = uwufetch ()},
138+ {.label = "screenFetch" , .version = screenfetch ()},
139+ };
140+
141+ memcpy (stats , data , sizeof data );
146142}
0 commit comments