lib: Rename fgets_slash to x_fgets_slash
authorVolker Lendecke <vl@samba.org>
Wed, 16 Nov 2016 15:39:21 +0000 (15:39 +0000)
committerJeremy Allison <jra@samba.org>
Sun, 20 Nov 2016 01:28:11 +0000 (02:28 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/samba_util.h
lib/util/util_file.c
libcli/nbt/lmhosts.c
source3/auth/user_util.c
source3/nmbd/nmbd_synclists.c
source3/nmbd/nmbd_winsserver.c
source3/printing/print_aix.c
source3/printing/print_standard.c

index 416fde8aeb03fd2b18e1537061f95690ccace118..74adb25df240e1e4a81294bd2853738202bd1114 100644 (file)
@@ -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 
index 1ec3582d5505acc8c02bf1f9ce320f1169868e92..cad917b0709b8ef33f6671e5da4b88ee99dd6700 100644 (file)
@@ -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;
index 3e746f01f27c4a0297f149e49c212e5e686e69a0..e68dc08d1e50fa0846b6ef55a62cbc31bbea0c5e 100644 (file)
@@ -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;
                }
 
index d5c61b22794645eac68b088366fbdf2d4346f9b8..79b193e686d020bf06ce0119e6fc17456d2f1af1 100644 (file)
@@ -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;
index f3e524d932a292a7d697d0170266cd75869154ec..1c2b04d165654f1472dc91860b2f967dc09b0f39 100644 (file)
@@ -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;
index cdec10e08ca9c17dbc1abb1ceff8e2839ca488dc..cd4ff421860b3288e404cb91459cc7710f5ec949 100644 (file)
@@ -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;
                }
 
index 927a71b2948ba2c6fc24d60044e11e075f917b42..da47be05bed69527145531e13f7dbfd51671fd32 100644 (file)
@@ -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)
index 140ca70739db467eb549fc8e6476e54ae92157ad..080ef077207d4d9dc62e1a500cb8ec9d2420b700 100644 (file)
@@ -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;