rem: int id = sftp_get_id(); int replid;
add: uint32_t id = sftp_get_id(); uint32_t replid;
context: static void sftp_detect_uid(){    int flags;    int id = sftp_get_id();    int replid;    uint8_t type;    struct buffer buf;    struct stat stbuf;    buf_init(&buf, 9);    buf_add_uint32(&buf, id);    buf_add_string(&buf, ".");    if (sftp_send(SSH_FXP_STAT, &buf) == -1)        goto out;    buf_clear(&buf);    if (sftp_read(&type, &buf) == -1)        goto out;    if (type != SSH_FXP_ATTRS && type != SSH_FXP_STATUS) {        fprintf(stderr, "protocol error\n");        goto out;    }    if (buf_get_uint32(&buf, &replid) == -1)        goto out;    if (replid != id) {        fprintf(stderr, "bad reply ID\n");        goto out;    }    if (type == SSH_FXP_STATUS) {        uint32_t serr;        if (buf_get_uint32(&buf, &serr) == -1)            goto out;        fprintf(stderr, "failed to stat home directory (%i)\n", serr);        goto out;    }    if (buf_get_attrs(&buf, &stbuf, &flags) == -1)        goto out;    if (!(flags & SSH_FILEXFER_ATTR_UIDGID))        goto out;    remote_uid = stbuf.st_uid;    local_uid = getuid();    remote_uid_detected = 1;    DEBUG("remote_uid = %i\n", remote_uid); out:    if (!remote_uid_detected)        fprintf(stderr, "failed to detect remote user ID\n");    buf_free(&buf);}