This commit is contained in:
Your Name 2024-07-09 22:54:12 +03:00
parent 33b89e64da
commit 34fbb11114
6 changed files with 7 additions and 4 deletions

View File

@ -16,8 +16,8 @@
#ifdef _PW_CHECK_H #ifdef _PW_CHECK_H
/* Pw_check. Salt for crypt() */ /* Pw_check. Salt for crypt() */
static int MU_SALT_ENC[] = {'s', 'a', 'l', 't'}; int MU_SALT_ENC[] = {'s', 'a', 'l', 't'};
static char MU_SALT_BUF[sizeof(MU_SALT_ENC) + 1]; char MU_SALT_BUF[sizeof(MU_SALT_ENC) + 1];
#endif #endif
#ifdef _MOUNT_C #ifdef _MOUNT_C

View File

@ -1,5 +1,7 @@
#include "human.h" #include "human.h"
char mu_hs_buf[MU_HUMAN_BUF_SIZE + 1];
char *mu_humansize(off_t n, off_t block) { char *mu_humansize(off_t n, off_t block) {
memset(mu_hs_buf, '\0', sizeof(mu_hs_buf)); memset(mu_hs_buf, '\0', sizeof(mu_hs_buf));

View File

@ -6,7 +6,6 @@
#include <string.h> #include <string.h>
#define MU_HUMAN_BUF_SIZE 16 #define MU_HUMAN_BUF_SIZE 16
static char mu_hs_buf[MU_HUMAN_BUF_SIZE + 1];
char *mu_humansize(off_t n, off_t block); char *mu_humansize(off_t n, off_t block);
#endif #endif

View File

@ -2,6 +2,8 @@
#include <sys/stat.h> #include <sys/stat.h>
#include "mode_to_str.h" #include "mode_to_str.h"
char mode[11];
char *mu_mode_2_str(mode_t file_mode) { char *mu_mode_2_str(mode_t file_mode) {
snprintf(mode, sizeof(mode), "----------"); snprintf(mode, sizeof(mode), "----------");

View File

@ -1,6 +1,5 @@
#ifndef _MODE_TO_STR_H #ifndef _MODE_TO_STR_H
#define _MODE_TO_STR_H #define _MODE_TO_STR_H
static char mode[11];
char *mu_mode_2_str(mode_t file_mode); char *mu_mode_2_str(mode_t file_mode);
#endif #endif

View File

@ -1,4 +1,5 @@
#define _XOPEN_SOURCE #define _XOPEN_SOURCE
#define __USE_POSIX199309
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>