changed to compile with g++
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1015 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
e021834e19
commit
cadfb489ba
8
disk.c
8
disk.c
@ -201,7 +201,7 @@ ftruncate_growable(int fd, off_t length)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
off_t pos;
|
off_t pos;
|
||||||
static const char zero;
|
static const char zero = 0;
|
||||||
|
|
||||||
/* Try the simple method first */
|
/* Try the simple method first */
|
||||||
if ((ret = ftruncate(fd, length)) != -1)
|
if ((ret = ftruncate(fd, length)) != -1)
|
||||||
@ -209,7 +209,7 @@ ftruncate_growable(int fd, off_t length)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some kind of error. Perhaps we were trying to grow. Retry
|
* Some kind of error. Perhaps we were trying to grow. Retry
|
||||||
* in a safe way.
|
* in a safe way.
|
||||||
*/
|
*/
|
||||||
@ -325,7 +325,7 @@ disk_enum_devices(uint32 * id, char *optarg)
|
|||||||
fprintf(stderr, "share name %s truncated to %s\n", optarg,
|
fprintf(stderr, "share name %s truncated to %s\n", optarg,
|
||||||
g_rdpdr_device[*id].name);
|
g_rdpdr_device[*id].name);
|
||||||
|
|
||||||
g_rdpdr_device[*id].local_path = xmalloc(strlen(pos2) + 1);
|
g_rdpdr_device[*id].local_path = (char *) xmalloc(strlen(pos2) + 1);
|
||||||
strcpy(g_rdpdr_device[*id].local_path, pos2);
|
strcpy(g_rdpdr_device[*id].local_path, pos2);
|
||||||
g_rdpdr_device[*id].device_type = DEVICE_TYPE_DISK;
|
g_rdpdr_device[*id].device_type = DEVICE_TYPE_DISK;
|
||||||
count++;
|
count++;
|
||||||
@ -960,7 +960,7 @@ NotifyInfo(NTHANDLE handle, uint32 info_class, NOTIFY * p)
|
|||||||
if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
|
if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
|
||||||
continue;
|
continue;
|
||||||
p->num_entries++;
|
p->num_entries++;
|
||||||
fullname = xmalloc(strlen(pfinfo->path) + strlen(dp->d_name) + 2);
|
fullname = (char *) xmalloc(strlen(pfinfo->path) + strlen(dp->d_name) + 2);
|
||||||
sprintf(fullname, "%s/%s", pfinfo->path, dp->d_name);
|
sprintf(fullname, "%s/%s", pfinfo->path, dp->d_name);
|
||||||
|
|
||||||
if (!stat(fullname, &buf))
|
if (!stat(fullname, &buf))
|
||||||
|
Loading…
Reference in New Issue
Block a user