mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
lib: Rename fgets_slash to x_fgets_slash
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
cd9d957adb
commit
1314db09dd
@ -337,7 +337,7 @@ read a line from a file with possible \ continuation chars.
|
||||
Blanks at the start or end of a line are stripped.
|
||||
The string will be allocated if s2 is NULL
|
||||
**/
|
||||
_PUBLIC_ char *fgets_slash(char *s2,int maxlen,XFILE *f);
|
||||
_PUBLIC_ char *x_fgets_slash(char *s2,int maxlen,XFILE *f);
|
||||
|
||||
/**
|
||||
* Read one line (data until next newline or eof) and allocate it
|
||||
|
@ -36,7 +36,7 @@ read a line from a file with possible \ continuation chars.
|
||||
Blanks at the start or end of a line are stripped.
|
||||
The string will be allocated if s2 is NULL
|
||||
**/
|
||||
_PUBLIC_ char *fgets_slash(char *s2,int maxlen,XFILE *f)
|
||||
_PUBLIC_ char *x_fgets_slash(char *s2,int maxlen,XFILE *f)
|
||||
{
|
||||
char *s=s2;
|
||||
int len = 0;
|
||||
@ -97,7 +97,7 @@ _PUBLIC_ char *fgets_slash(char *s2,int maxlen,XFILE *f)
|
||||
maxlen *= 2;
|
||||
t = realloc_p(s, char, maxlen);
|
||||
if (!t) {
|
||||
DEBUG(0,("fgets_slash: failed to expand buffer!\n"));
|
||||
DBG_ERR("failed to expand buffer!\n");
|
||||
SAFE_FREE(s);
|
||||
return(NULL);
|
||||
} else s = t;
|
||||
|
@ -66,7 +66,7 @@ bool getlmhostsent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, int *name_type,
|
||||
|
||||
*name_type = -1;
|
||||
|
||||
if (!fgets_slash(line,sizeof(line),fp)) {
|
||||
if (!x_fgets_slash(line,sizeof(line),fp)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -361,7 +361,7 @@ bool map_username(TALLOC_CTX *ctx, const char *user_in, char **p_user_out)
|
||||
|
||||
DEBUG(4,("Scanning username map %s\n",mapfile));
|
||||
|
||||
while((s=fgets_slash(buf,sizeof(buf),f))!=NULL) {
|
||||
while((s=x_fgets_slash(buf,sizeof(buf),f))!=NULL) {
|
||||
char *unixname = s;
|
||||
char *dosname = strchr_m(unixname,'=');
|
||||
char **dosuserlist;
|
||||
|
@ -262,7 +262,7 @@ static void complete_sync(struct sync_record *s)
|
||||
while (!x_feof(f)) {
|
||||
TALLOC_CTX *frame = NULL;
|
||||
|
||||
if (!fgets_slash(line,sizeof(line),f))
|
||||
if (!x_fgets_slash(line,sizeof(line),f))
|
||||
continue;
|
||||
|
||||
ptr = line;
|
||||
|
@ -655,7 +655,7 @@ bool initialise_wins(void)
|
||||
|
||||
/* Read a line from the wins.dat file. Strips whitespace
|
||||
from the beginning and end of the line. */
|
||||
if (!fgets_slash(line,sizeof(line),fp)) {
|
||||
if (!x_fgets_slash(line,sizeof(line),fp)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ bool aix_cache_reload(struct pcap_cache **_pcache)
|
||||
|
||||
iEtat = 0;
|
||||
/* scan qconfig file for searching <printername>: */
|
||||
for (;(line = fgets_slash(NULL, 1024, pfile)); free(line)) {
|
||||
for (;(line = x_fgets_slash(NULL, 1024, pfile)); free(line)) {
|
||||
bool ok;
|
||||
|
||||
if (*line == '*' || *line == 0)
|
||||
|
@ -73,7 +73,8 @@ bool std_pcap_cache_reload(const char *pcap_name, struct pcap_cache **_pcache)
|
||||
return false;
|
||||
}
|
||||
|
||||
for (; (pcap_line = fgets_slash(NULL, 1024, pcap_file)) != NULL; free(pcap_line)) {
|
||||
for (; (pcap_line = x_fgets_slash(NULL, 1024, pcap_file)) != NULL;
|
||||
free(pcap_line)) {
|
||||
char *name = NULL;
|
||||
char *comment = NULL;
|
||||
char *p, *q;
|
||||
|
Loading…
Reference in New Issue
Block a user