diff options
Diffstat (limited to 'source4/lib/util')
-rw-r--r-- | source4/lib/util/debug.c | 2 | ||||
-rw-r--r-- | source4/lib/util/pidfile.c | 10 | ||||
-rw-r--r-- | source4/lib/util/util.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/source4/lib/util/debug.c b/source4/lib/util/debug.c index fa781c823a..9084c2b406 100644 --- a/source4/lib/util/debug.c +++ b/source4/lib/util/debug.c @@ -182,7 +182,7 @@ _PUBLIC_ void setup_logging(const char *prog_name, enum debug_logtype new_logtyp return a string constant containing n tabs no more than 10 tabs are returned */ -_PUBLIC_ const char *do_debug_tab(uint_t n) +_PUBLIC_ const char *do_debug_tab(int n) { const char *tabs[] = {"", "\t", "\t\t", "\t\t\t", "\t\t\t\t", "\t\t\t\t\t", "\t\t\t\t\t\t", "\t\t\t\t\t\t\t", "\t\t\t\t\t\t\t\t", diff --git a/source4/lib/util/pidfile.c b/source4/lib/util/pidfile.c index 1a46e6e70c..dc9ecafae9 100644 --- a/source4/lib/util/pidfile.c +++ b/source4/lib/util/pidfile.c @@ -40,7 +40,7 @@ _PUBLIC_ pid_t pidfile_pid(const char *name) { int fd; char pidstr[20]; - uint_t ret; + pid_t ret; char *pidFile; asprintf(&pidFile, "%s/%s.pid", lp_piddir(), name); @@ -58,9 +58,9 @@ _PUBLIC_ pid_t pidfile_pid(const char *name) goto noproc; } - ret = atoi(pidstr); + ret = (pid_t)atoi(pidstr); - if (!process_exists((pid_t)ret)) { + if (!process_exists(ret)) { goto noproc; } @@ -71,7 +71,7 @@ _PUBLIC_ pid_t pidfile_pid(const char *name) close(fd); SAFE_FREE(pidFile); - return (pid_t)ret; + return ret; noproc: close(fd); @@ -113,7 +113,7 @@ void pidfile_create(const char *name) } memset(buf, 0, sizeof(buf)); - slprintf(buf, sizeof(buf) - 1, "%u\n", (uint_t) getpid()); + slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) getpid()); if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) { DEBUG(0,("ERROR: can't write to file %s: %s\n", pidFile, strerror(errno))); diff --git a/source4/lib/util/util.c b/source4/lib/util/util.c index b7293c0092..0354d17097 100644 --- a/source4/lib/util/util.c +++ b/source4/lib/util/util.c @@ -212,7 +212,7 @@ _PUBLIC_ int set_blocking(int fd, BOOL set) Sleep for a specified number of milliseconds. **/ -_PUBLIC_ void msleep(uint_t t) +_PUBLIC_ void msleep(unsigned int t) { struct timeval tval; @@ -581,7 +581,7 @@ _PUBLIC_ void dump_data_pw(const char *msg, const uint8_t * data, size_t len) * see if a range of memory is all zero. A NULL pointer is considered * to be all zero */ -_PUBLIC_ BOOL all_zero(const uint8_t *ptr, uint_t size) +_PUBLIC_ BOOL all_zero(const uint8_t *ptr, size_t size) { int i; if (!ptr) return True; |