| От | Qingqing Zhou |
|---|---|
| Тема | signed short fd |
| Дата | |
| Msg-id | d1378u$2ekt$2@news.hub.org обсуждение исходный текст |
| Ответы |
Re: signed short fd
|
| Список | pgsql-hackers |
We have the following definition in fd.c:
typedef struct vfd
{signed short fd; /* current FD, or VFD_CLOSED if none */...
} Vfd;
but seems we use Vfd.fd as an integer, say in fileNameOpenFile() we have:
vfdP->fd = BasicOpenFile(fileName, fileFlags, fileMode);
So is there any special reason we don't worry that convert an integer to
short will not lose data? Maybe we make the assumption that all OS will
implement "fd" as an array index and is at most 2^16 this big, but why not
use an integer?
Regards,
Qingqing
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера