Skip to content

RAM optimization #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cpu/cpu_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ void print_cpu_info(void)
if (cpu_file)
{
char line[128];
int lines = 0;
uint8_t lines = 0;
while (fgets(line, sizeof(line), cpu_file) && lines < 19)
{
printf("| %s", line);
lines++;
++lines;
}
fclose(cpu_file);
printf("|____________\n\n");
Expand Down
1 change: 1 addition & 0 deletions src/cpu/cpu_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#ifndef CPU_INFO_H_SENTRY
#define CPU_INFO_H_SENTRY
#include <stdio.h>
#include <stdint.h>

void print_cpu_info(void);
void print_full_cpu_info(void);
Expand Down
2 changes: 1 addition & 1 deletion src/hlp/hlp_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ void print_hlp_info(void)
void print_ver_info(void)
{
print_banner();
printf("spynix v4.0.0\n\nFor more info visit: https://github.com/git-user-cpp/spynix\n");
printf("spynix v4.0.1\n\nFor more info visit: https://github.com/git-user-cpp/spynix\n");
}
4 changes: 2 additions & 2 deletions src/net/net_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void print_net_info(char *hostname)
{
struct hostent *host = gethostbyname(hostname);
struct ifaddrs *ifaddr, *ifa;
int i;
uint8_t i;

if(host == NULL)
{
Expand All @@ -25,7 +25,7 @@ void print_net_info(char *hostname)
{
printf("Host Name: %s\n", host->h_name);
printf("IP Address: ");
for(i = 0; host->h_addr_list[i] != NULL; i++)
for(i = 0; host->h_addr_list[i] != NULL; ++i)
{
printf("%s ", inet_ntoa(*(struct in_addr *)host->h_addr_list[i]));
}
Expand Down
1 change: 1 addition & 0 deletions src/net/net_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <stdint.h>

void print_net_info(char *hostname);
#endif