Convert all uint32/16/8 to _t in source3/lib.
authorRichard Sharpe <rsharpe@samba.org>
Sat, 9 May 2015 23:33:10 +0000 (16:33 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 13 May 2015 17:11:23 +0000 (19:11 +0200)
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
16 files changed:
source3/lib/ctdbd_conn.c
source3/lib/events.c
source3/lib/messages.c
source3/lib/popt_common.c
source3/lib/sysquotas_4A.c
source3/lib/sysquotas_linux.c
source3/lib/sysquotas_nfs.c
source3/lib/sysquotas_xfs.c
source3/lib/system.c
source3/lib/util.c
source3/lib/util_ea.c
source3/lib/util_sd.c
source3/lib/util_tdb.c
source3/lib/util_wellknown.c
source3/lib/winbind_util.c
source3/lib/winbind_util.h

index 748a99ffa74624e2775600bc2766ab39bdd2cf38..1285e4b3c54715af91a743f6f10296181d8e13b1 100644 (file)
@@ -699,7 +699,7 @@ static NTSTATUS ctdb_handle_message(struct messaging_context *msg_ctx,
 
 static void ctdbd_socket_handler(struct tevent_context *event_ctx,
                                 struct tevent_fd *event,
-                                uint16 flags,
+                                uint16_t flags,
                                 void *private_data)
 {
        struct ctdbd_connection *conn = talloc_get_type_abort(
@@ -887,7 +887,7 @@ static NTSTATUS ctdbd_control(struct ctdbd_connection *conn,
        reply = (struct ctdb_reply_control *)hdr;
 
        if (outdata) {
-               if (!(outdata->dptr = (uint8 *)talloc_memdup(
+               if (!(outdata->dptr = (uint8_t *)talloc_memdup(
                              mem_ctx, reply->data, reply->datalen))) {
                        TALLOC_FREE(reply);
                        return NT_STATUS_NO_MEMORY;
index 62aa4d973e94bb869dbe8004249371e80192ee4b..0bc56e454add8445782f95c1b94746218f19791c 100644 (file)
@@ -212,7 +212,7 @@ bool run_events_poll(struct tevent_context *ev, int pollrtn,
 
        for (fde = ev->fd_events; fde; fde = fde->next) {
                struct pollfd *pfd;
-               uint16 flags = 0;
+               uint16_t flags = 0;
 
                if ((fde->flags & (TEVENT_FD_READ|TEVENT_FD_WRITE)) == 0) {
                        continue;
index f0d2797dba40ceca92705a78afd61f4fb7027ef1..51e88e264192d19ac2971d3c8f5eb3a93b8e4acc 100644 (file)
@@ -59,7 +59,7 @@
 
 struct messaging_callback {
        struct messaging_callback *prev, *next;
-       uint32 msg_type;
+       uint32_t msg_type;
        void (*fn)(struct messaging_context *msg, void *private_data, 
                   uint32_t msg_type, 
                   struct server_id server_id, DATA_BLOB *data);
@@ -112,7 +112,7 @@ static void ping_message(struct messaging_context *msg_ctx,
 struct msg_all {
        struct messaging_context *msg_ctx;
        int msg_type;
-       uint32 msg_flag;
+       uint32_t msg_flag;
        const void *buf;
        size_t len;
        int n_sent;
@@ -243,7 +243,7 @@ static void messaging_recv_cb(const uint8_t *msg, size_t msg_len,
 
        rec = (struct messaging_rec) {
                .msg_version = MESSAGE_VERSION,
-               .buf.data = discard_const_p(uint8, msg) + sizeof(hdr),
+               .buf.data = discard_const_p(uint8_t, msg) + sizeof(hdr),
                .buf.length = msg_len - sizeof(hdr),
                .num_fds = num_fds,
                .fds = fds64,
index 44f6aae99965ff8dd1edee7f0ce8a092167013b4..c2a95d74151be74ea7f41c46c2f464189de91deb 100644 (file)
@@ -286,7 +286,7 @@ static void get_credentials_file(struct user_auth_info *auth_info,
 {
        XFILE *auth;
        fstring buf;
-       uint16 len = 0;
+       uint16_t len = 0;
        char *ptr, *val, *param;
 
        if ((auth=x_fopen(file, O_RDONLY, 0)) == NULL)
index 8a1b12238cca88e449297eca1381da6dee785a06..244b612c11fae2c6754d5c892ce39c8032354d30 100644 (file)
@@ -87,7 +87,7 @@
 int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
+       uint32_t qflags = 0;
        struct dqblk D;
        uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
@@ -181,8 +181,8 @@ int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
 int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
-       uint32 oldqflags = 0;
+       uint32_t qflags = 0;
+       uint32_t oldqflags = 0;
        struct dqblk D;
        uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
index 5720328764b539812d0d2396072ec5b9552c05c5..68b9f906429a6baea662feb73e64d35dc4dd4901 100644 (file)
@@ -39,7 +39,7 @@
 static int sys_get_linux_v1_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
+       uint32_t qflags = 0;
        struct v1_kern_dqblk D;
        uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
@@ -107,8 +107,8 @@ static int sys_get_linux_v1_quota(const char *path, const char *bdev, enum SMB_Q
 static int sys_set_linux_v1_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
-       uint32 oldqflags = 0;
+       uint32_t qflags = 0;
+       uint32_t oldqflags = 0;
        struct v1_kern_dqblk D;
        uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
@@ -173,7 +173,7 @@ static int sys_set_linux_v1_quota(const char *path, const char *bdev, enum SMB_Q
 static int sys_get_linux_v2_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
+       uint32_t qflags = 0;
        struct v2_kern_dqblk D;
        uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
@@ -241,8 +241,8 @@ static int sys_get_linux_v2_quota(const char *path, const char *bdev, enum SMB_Q
 static int sys_set_linux_v2_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
-       uint32 oldqflags = 0;
+       uint32_t qflags = 0;
+       uint32_t oldqflags = 0;
        struct v2_kern_dqblk D;
        uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
@@ -307,7 +307,7 @@ static int sys_set_linux_v2_quota(const char *path, const char *bdev, enum SMB_Q
 static int sys_get_linux_gen_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
+       uint32_t qflags = 0;
        struct if_dqblk D;
        uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
@@ -375,8 +375,8 @@ static int sys_get_linux_gen_quota(const char *path, const char *bdev, enum SMB_
 static int sys_set_linux_gen_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
-       uint32 oldqflags = 0;
+       uint32_t qflags = 0;
+       uint32_t oldqflags = 0;
        struct if_dqblk D;
        uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
 
@@ -504,7 +504,7 @@ int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
 int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 oldqflags = 0;
+       uint32_t oldqflags = 0;
 
        if (!path||!bdev||!dp)
                smb_panic("sys_set_vfs_quota: called with NULL pointer");
index 2b0e494aef77b4b6d6c191d794ffe7341111967e..58eedf0a52e9264fad9dde86dc13e9325d81b0ec 100644 (file)
@@ -113,7 +113,7 @@ int sys_get_nfs_quota(const char *path, const char *bdev,
        enum clnt_stat clnt_stat;
 
        int ret = -1;
-       uint32 qflags = 0;
+       uint32_t qflags = 0;
 
        if (!path || !bdev || !dp) {
                smb_panic("sys_get_nfs_quota: called with NULL pointer");
index cf77eace977ed877dcdd6bed10b048e8810d4a68..ccc7fc09111339909f7edc18693e7768de436d5a 100644 (file)
@@ -72,7 +72,7 @@
 int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
+       uint32_t qflags = 0;
        uint64_t bsize = (uint64_t)BBSIZE;
        struct fs_disk_quota D;
        struct fs_quota_stat F;
@@ -159,7 +159,7 @@ int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
 int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
 {
        int ret = -1;
-       uint32 qflags = 0;
+       uint32_t qflags = 0;
        uint64_t bsize = (uint64_t)BBSIZE;
        struct fs_disk_quota D;
        struct fs_quota_stat F;
index e933c46c3067684bbe6639aa8fe8c641f64f6399..e54b946d33c0c0fbd252ff0427dbf4435aeaf041 100644 (file)
@@ -1217,9 +1217,9 @@ int sys_pclose(int fd)
 uint32_t unix_dev_major(SMB_DEV_T dev)
 {
 #if defined(HAVE_DEVICE_MAJOR_FN)
-        return (uint32)major(dev);
+        return (uint32_t)major(dev);
 #else
-        return (uint32)(dev >> 8);
+        return (uint32_t)(dev >> 8);
 #endif
 }
 
@@ -1230,9 +1230,9 @@ uint32_t unix_dev_major(SMB_DEV_T dev)
 uint32_t unix_dev_minor(SMB_DEV_T dev)
 {
 #if defined(HAVE_DEVICE_MINOR_FN)
-        return (uint32)minor(dev);
+        return (uint32_t)minor(dev);
 #else
-        return (uint32)(dev & 0xff);
+        return (uint32_t)(dev & 0xff);
 #endif
 }
 
index 1d768202448086dcee51746dfef2190e9f573ef1..2fd2b6b9f218634848f246d46b39ea5923483f72 100644 (file)
@@ -223,7 +223,7 @@ ssize_t message_push_blob(uint8_t **outbuf, DATA_BLOB blob)
        size_t newlen = smb_len(*outbuf) + 4 + blob.length;
        uint8_t *tmp;
 
-       if (!(tmp = talloc_realloc(NULL, *outbuf, uint8, newlen))) {
+       if (!(tmp = talloc_realloc(NULL, *outbuf, uint8_t, newlen))) {
                DEBUG(0, ("talloc failed\n"));
                return -1;
        }
@@ -1937,7 +1937,7 @@ uint32_t map_share_mode_to_deny_mode(uint32_t share_access, uint32_t private_opt
                return DENY_FCB;
        }
 
-       return (uint32)-1;
+       return (uint32_t)-1;
 }
 
 pid_t procid_to_pid(const struct server_id *proc)
index 81684da4cb299067d726624a98ccc884c40d947a..e980e69ab4ca85fa64955c1d480854fdb847b6ef 100644 (file)
@@ -28,7 +28,7 @@
 struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used)
 {
        struct ea_list *eal = talloc_zero(ctx, struct ea_list);
-       uint16 val_len;
+       uint16_t val_len;
        unsigned int namelen;
        size_t converted_size;
 
index 810053927f261c390ca8ac5ffa0d3d9426bc9738..bfd5dbb979a760e7f6d7d29a853885f169a334fd 100644 (file)
@@ -33,7 +33,7 @@
 
 struct perm_value {
        const char *perm;
-       uint32 mask;
+       uint32_t mask;
 };
 
 static const struct perm_value special_values[] = {
@@ -84,7 +84,7 @@ static NTSTATUS cli_lsa_lookup_sid(struct cli_state *cli,
                                   enum lsa_SidType *type,
                                   char **domain, char **name)
 {
-       uint16 orig_cnum = cli_state_get_tid(cli);
+       uint16_t orig_cnum = cli_state_get_tid(cli);
        struct rpc_pipe_client *p = NULL;
        struct policy_handle handle;
        NTSTATUS status;
@@ -165,7 +165,7 @@ static NTSTATUS cli_lsa_lookup_name(struct cli_state *cli,
                                    enum lsa_SidType *type,
                                    struct dom_sid *sid)
 {
-       uint16 orig_cnum = cli_state_get_tid(cli);
+       uint16_t orig_cnum = cli_state_get_tid(cli);
        struct rpc_pipe_client *p;
        struct policy_handle handle;
        NTSTATUS status;
@@ -292,7 +292,7 @@ void print_ace(struct cli_state *cli, FILE *f, struct security_ace *ace,
        const struct perm_value *v;
        fstring sidstr;
        int do_print = 0;
-       uint32 got_mask;
+       uint32_t got_mask;
 
        SidToString(cli, sidstr, &ace->trustee, numeric);
 
@@ -580,7 +580,7 @@ void sec_desc_print(struct cli_state *cli, FILE *f,
                    struct security_descriptor *sd, bool numeric)
 {
        fstring sidstr;
-       uint32 i;
+       uint32_t i;
 
        fprintf(f, "REVISION:%d\n", sd->revision);
        print_acl_ctrl(f, sd->type, numeric);
index f30cccabb7e1b5a80c55c1335ea3e85b071a6cc1..d7a8a47580414f35156c6ae86c2482540f61b315 100644 (file)
@@ -45,17 +45,17 @@ int tdb_trans_store_bystring(TDB_CONTEXT *tdb, const char *keystr,
  integers and strings.
 ****************************************************************************/
 
-static size_t tdb_pack_va(uint8 *buf, int bufsize, const char *fmt, va_list ap)
+static size_t tdb_pack_va(uint8_t *buf, int bufsize, const char *fmt, va_list ap)
 {
-       uint8 bt;
-       uint16 w;
-       uint32 d;
+       uint8_t bt;
+       uint16_t w;
+       uint32_t d;
        int i;
        void *p;
        int len;
        char *s;
        char c;
-       uint8 *buf0 = buf;
+       uint8_t *buf0 = buf;
        const char *fmt0 = fmt;
        int bufsize0 = bufsize;
 
@@ -63,19 +63,19 @@ static size_t tdb_pack_va(uint8 *buf, int bufsize, const char *fmt, va_list ap)
                switch ((c = *fmt++)) {
                case 'b': /* unsigned 8-bit integer */
                        len = 1;
-                       bt = (uint8)va_arg(ap, int);
+                       bt = (uint8_t)va_arg(ap, int);
                        if (bufsize && bufsize >= len)
                                SSVAL(buf, 0, bt);
                        break;
                case 'w': /* unsigned 16-bit integer */
                        len = 2;
-                       w = (uint16)va_arg(ap, int);
+                       w = (uint16_t)va_arg(ap, int);
                        if (bufsize && bufsize >= len)
                                SSVAL(buf, 0, w);
                        break;
                case 'd': /* signed 32-bit integer (standard int in most systems) */
                        len = 4;
-                       d = va_arg(ap, uint32);
+                       d = va_arg(ap, uint32_t);
                        if (bufsize && bufsize >= len)
                                SIVAL(buf, 0, d);
                        break;
@@ -129,7 +129,7 @@ static size_t tdb_pack_va(uint8 *buf, int bufsize, const char *fmt, va_list ap)
        return PTR_DIFF(buf, buf0);
 }
 
-size_t tdb_pack(uint8 *buf, int bufsize, const char *fmt, ...)
+size_t tdb_pack(uint8_t *buf, int bufsize, const char *fmt, ...)
 {
        va_list ap;
        size_t result;
@@ -140,7 +140,7 @@ size_t tdb_pack(uint8 *buf, int bufsize, const char *fmt, ...)
        return result;
 }
 
-bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8 **buf, size_t *len,
+bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8_t **buf, size_t *len,
                     const char *fmt, ...)
 {
        va_list ap;
@@ -151,10 +151,10 @@ bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8 **buf, size_t *len,
        va_end(ap);
 
        if (mem_ctx != NULL) {
-               *buf = talloc_realloc(mem_ctx, *buf, uint8,
+               *buf = talloc_realloc(mem_ctx, *buf, uint8_t,
                                            (*len) + len1);
        } else {
-               *buf = SMB_REALLOC_ARRAY(*buf, uint8, (*len) + len1);
+               *buf = SMB_REALLOC_ARRAY(*buf, uint8_t, (*len) + len1);
        }
 
        if (*buf == NULL) {
@@ -179,18 +179,18 @@ bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8 **buf, size_t *len,
  integers and strings.
 ****************************************************************************/
 
-int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...)
+int tdb_unpack(const uint8_t *buf, int bufsize, const char *fmt, ...)
 {
        va_list ap;
-       uint8 *bt;
-       uint16 *w;
-       uint32 *d;
+       uint8_t *bt;
+       uint16_t *w;
+       uint32_t *d;
        int len;
        int *i;
        void **p;
        char *s, **b, **ps;
        char c;
-       const uint8 *buf0 = buf;
+       const uint8_t *buf0 = buf;
        const char *fmt0 = fmt;
        int bufsize0 = bufsize;
 
@@ -200,21 +200,21 @@ int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...)
                switch ((c=*fmt++)) {
                case 'b': /* unsigned 8-bit integer */
                        len = 1;
-                       bt = va_arg(ap, uint8 *);
+                       bt = va_arg(ap, uint8_t *);
                        if (bufsize < len)
                                goto no_space;
                        *bt = SVAL(buf, 0);
                        break;
                case 'w': /* unsigned 16-bit integer */
                        len = 2;
-                       w = va_arg(ap, uint16 *);
+                       w = va_arg(ap, uint16_t *);
                        if (bufsize < len)
                                goto no_space;
                        *w = SVAL(buf, 0);
                        break;
                case 'd': /* unsigned 32-bit integer (standard int in most systems) */
                        len = 4;
-                       d = va_arg(ap, uint32 *);
+                       d = va_arg(ap, uint32_t *);
                        if (bufsize < len)
                                goto no_space;
                        *d = IVAL(buf, 0);
index f3c0f17a2a6c9bb76c04da6908d7eacea8e584c9..0f627d1443cd7da53d78e4e1c6602a4f60cb1a0e 100644 (file)
@@ -24,7 +24,7 @@
 #include "../libcli/security/security.h"
 
 struct rid_name_map {
-       uint32 rid;
+       uint32_t rid;
        const char *name;
 };
 
@@ -114,7 +114,7 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
 {
        int i;
        struct dom_sid dom_sid;
-       uint32 rid;
+       uint32_t rid;
        const struct rid_name_map *users = NULL;
 
        sid_copy(&dom_sid, sid);
index 3189dd3b142d0e475029f4961143d08b81ff14c8..b3ecac15d79a33dfbe3aaf5d478840a5c520b6a1 100644 (file)
@@ -217,7 +217,7 @@ wbcErr wb_is_trusted_domain(const char *domain)
 
 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
                         const struct dom_sid *domain_sid,
-                        int num_rids, uint32 *rids,
+                        int num_rids, uint32_t *rids,
                         const char **domain_name,
                         const char ***names, enum lsa_SidType **types)
 {
@@ -449,7 +449,7 @@ wbcErr wb_is_trusted_domain(const char *domain)
 
 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
                         const struct dom_sid *domain_sid,
-                        int num_rids, uint32 *rids,
+                        int num_rids, uint32_t *rids,
                         const char **domain_name,
                         const char ***names, enum lsa_SidType **types)
 {
index abbc5a93c9d091c758f640c14dbade82aa364287..2a90092ca89eec3d523f11684c5ebdbab952330d 100644 (file)
@@ -43,7 +43,7 @@ struct passwd * winbind_getpwsid(const struct dom_sid *sid);
 wbcErr wb_is_trusted_domain(const char *domain);
 bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
                         const struct dom_sid *domain_sid,
-                        int num_rids, uint32 *rids,
+                        int num_rids, uint32_t *rids,
                         const char **domain_name,
                         const char ***names, enum lsa_SidType **types);
 bool winbind_allocate_uid(uid_t *uid);