Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
1ed61b3a
Commit
1ed61b3a
authored
Mar 25, 2001
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unportable assumptions about alignment of local char[n] variables.
parent
39ceedf5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
src/interfaces/odbc/socket.c
src/interfaces/odbc/socket.c
+14
-8
No files found.
src/interfaces/odbc/socket.c
View file @
1ed61b3a
...
...
@@ -227,23 +227,29 @@ SOCK_put_string(SocketClass *self, char *string)
int
SOCK_get_int
(
SocketClass
*
self
,
short
len
)
{
char
buf
[
4
];
switch
(
len
)
{
case
2
:
SOCK_get_n_char
(
self
,
buf
,
len
);
{
unsigned
short
buf
;
SOCK_get_n_char
(
self
,
(
char
*
)
&
buf
,
len
);
if
(
self
->
reverse
)
return
*
((
unsigned
short
*
)
buf
)
;
return
buf
;
else
return
ntohs
(
*
((
unsigned
short
*
)
buf
));
return
ntohs
(
buf
);
}
case
4
:
SOCK_get_n_char
(
self
,
buf
,
len
);
{
unsigned
int
buf
;
SOCK_get_n_char
(
self
,
(
char
*
)
&
buf
,
len
);
if
(
self
->
reverse
)
return
*
((
unsigned
int
*
)
buf
)
;
return
buf
;
else
return
ntohl
(
*
((
unsigned
int
*
)
buf
));
return
ntohl
(
buf
);
}
default:
self
->
errornumber
=
SOCKET_GET_INT_WRONG_LENGTH
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment