summaryrefslogtreecommitdiff
path: root/source4/lib/util/util_file.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-27 17:21:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:53 -0500
commit4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a (patch)
treeb2465bb451c73232e640d2c2718a6af084be2345 /source4/lib/util/util_file.c
parent8a1d019f53ef6d1a6900a005b335bdc10d14bbe4 (diff)
downloadsamba-4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a.tar.gz
samba-4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a.tar.bz2
samba-4fb038b0b8e7a4bb69ac0d9022684eeaca8a491a.zip
r24710: Use standard boolean type for easier use by external users.
(This used to be commit 99f4124137d4a61216e8189f26d4da32882c0f4a)
Diffstat (limited to 'source4/lib/util/util_file.c')
-rw-r--r--source4/lib/util/util_file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/lib/util/util_file.c b/source4/lib/util/util_file.c
index a7ba048692..836e188ac1 100644
--- a/source4/lib/util/util_file.c
+++ b/source4/lib/util/util_file.c
@@ -38,7 +38,7 @@ _PUBLIC_ char *fgets_slash(char *s2,int maxlen,XFILE *f)
char *s=s2;
int len = 0;
int c;
- BOOL start_of_line = True;
+ bool start_of_line = true;
if (x_feof(f))
return(NULL);
@@ -70,7 +70,7 @@ _PUBLIC_ char *fgets_slash(char *s2,int maxlen,XFILE *f)
if (len > 0 && s[len-1] == '\\')
{
s[--len] = 0;
- start_of_line = True;
+ start_of_line = true;
break;
}
return(s);
@@ -83,7 +83,7 @@ _PUBLIC_ char *fgets_slash(char *s2,int maxlen,XFILE *f)
break;
/* fall through */
default:
- start_of_line = False;
+ start_of_line = false;
s[len++] = c;
s[len] = 0;
}
@@ -342,18 +342,18 @@ _PUBLIC_ void file_lines_slashcont(char **lines)
/**
save a lump of data into a file. Mostly used for debugging
*/
-_PUBLIC_ BOOL file_save(const char *fname, const void *packet, size_t length)
+_PUBLIC_ bool file_save(const char *fname, const void *packet, size_t length)
{
int fd;
fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0644);
if (fd == -1) {
- return False;
+ return false;
}
if (write(fd, packet, length) != (size_t)length) {
- return False;
+ return false;
}
close(fd);
- return True;
+ return true;
}
_PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) _PRINTF_ATTRIBUTE(2,0)