Fix a couple of broken assertions, and align the buffer correctly.

This commit is contained in:
Michael Brown
2006-04-28 14:09:31 +00:00
parent 79f64eea55
commit 1488cd3b73
2 changed files with 6 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ struct ll_protocol;
* This structure is used to represent a network packet within gPXE.
*/
struct pk_buff {
/** Head of the buffer */
/** Start of the buffer */
void *head;
/** Start of data */
void *data;
@@ -87,7 +87,7 @@ static inline void * pkb_push ( struct pk_buff *pkb, size_t len ) {
*/
static inline void * pkb_pull ( struct pk_buff *pkb, size_t len ) {
pkb->data += len;
assert ( pkb->data >= pkb->tail );
assert ( pkb->data <= pkb->tail );
return pkb->data;
}