path.c: PaExpand() constify and add prototype

This commit is contained in:
Darryl L. Miles 2024-10-12 08:15:58 +01:00 committed by Tim Edwards
parent 6a6f85862e
commit feef9730f3
2 changed files with 4 additions and 3 deletions

View File

@ -162,12 +162,13 @@ PaAppend(char **pathptr, const char *newstring)
int
PaExpand(psource, pdest, size)
char **psource; /* Pointer to a pointer to the source string */
const char **psource; /* Pointer to a pointer to the source string */
char **pdest; /* Pointer to a ptr to dest string area. */
int size; /* Number of bytes available at pdest */
{
char *ps, *pd;
const char *ps;
char *pd;
struct passwd *passwd, *getpwnam();
char expandName[512], *string, *newEntry;
HashEntry *h;

View File

@ -46,7 +46,7 @@ extern int LookupAny(char, const char * const *);
extern int LookupFull(const char *, const char * const *);
extern int LookupStruct(const char *str, const LookupTable *table_start, int size);
extern int LookupStructFull(const char *str, const char * const *table, int size);
extern int PaExpand(char **, char **, int);
extern int PaExpand(const char **, char **, int);
extern char *nextName();
extern FILE *PaOpen(char *, char *, char *, char *, char *, char **);
extern FILE *PaLockOpen(char *, char *, char *, char *, char *, char **, bool *, int *);