git.samba.org
/
kai
/
samba.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r24780: More work allowing libutil to be used by external users.
[kai/samba.git]
/
source4
/
lib
/
stream
/
packet.c
diff --git
a/source4/lib/stream/packet.c
b/source4/lib/stream/packet.c
index 3f4fcb1ef7578ada455930ec0d8962bcd4e325de..e6cfae7bd69d0358fda46a4c94963255153f7718 100644
(file)
--- a/
source4/lib/stream/packet.c
+++ b/
source4/lib/stream/packet.c
@@
-281,9
+281,8
@@
_PUBLIC_ void packet_recv(struct packet_context *pc)
/* possibly expand the partial packet buffer */
if (npending + pc->num_read > pc->partial.length) {
/* possibly expand the partial packet buffer */
if (npending + pc->num_read > pc->partial.length) {
- status = data_blob_realloc(pc, &pc->partial, npending+pc->num_read);
- if (!NT_STATUS_IS_OK(status)) {
- packet_error(pc, status);
+ if (!data_blob_realloc(pc, &pc->partial, npending+pc->num_read)) {
+ packet_error(pc, NT_STATUS_NO_MEMORY);
return;
}
}
return;
}
}
@@
-322,9
+321,8
@@
_PUBLIC_ void packet_recv(struct packet_context *pc)
next_partial:
if (pc->partial.length != pc->num_read) {
next_partial:
if (pc->partial.length != pc->num_read) {
- status = data_blob_realloc(pc, &pc->partial, pc->num_read);
- if (!NT_STATUS_IS_OK(status)) {
- packet_error(pc, status);
+ if (!data_blob_realloc(pc, &pc->partial, pc->num_read)) {
+ packet_error(pc, NT_STATUS_NO_MEMORY);
return;
}
}
return;
}
}
@@
-361,9
+359,8
@@
next_partial:
return;
}
/* Trunate the blob sent to the caller to only the packet length */
return;
}
/* Trunate the blob sent to the caller to only the packet length */
- status = data_blob_realloc(pc, &blob, pc->packet_size);
- if (!NT_STATUS_IS_OK(status)) {
- packet_error(pc, status);
+ if (!data_blob_realloc(pc, &blob, pc->packet_size)) {
+ packet_error(pc, NT_STATUS_NO_MEMORY);
return;
}
} else {
return;
}
} else {