add comments to function declarations and definitions and updated to match coding style document.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11505 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey
2011-04-05 20:55:45 +00:00
parent c5981e3c3d
commit a1d4bfcc3f
47 changed files with 3680 additions and 3361 deletions

View File

@@ -20,7 +20,7 @@
BOOLEAN mIp4ConfigExist = FALSE;
STATIC EFI_HII_CONFIG_ROUTING_PROTOCOL *mHiiConfigRouting = NULL;
STATIC CONST UINTN SEC_TO_NS = 10000000;
STATIC CONST UINTN SecondsToNanoSeconds = 10000000;
STATIC CONST CHAR16 DhcpString[5] = L"DHCP";
STATIC CONST CHAR16 StaticString[7] = L"STATIC";
STATIC CONST CHAR16 PermanentString[10] = L"PERMANENT";
@@ -173,7 +173,7 @@ TestChildHandle (
Get the child handle of the NIC handle.
@param[in] Controller Routing information: GUID.
@param[in] ChildHandle Returned child handle.
@param[out] ChildHandle Returned child handle.
@retval EFI_SUCCESS Successfully to get child handle.
**/
@@ -1128,7 +1128,7 @@ IfconfigStartIp4(
Status = gBS->SetTimer (
TimerToGetMap,
TimerRelative,
MultU64x32 (SEC_TO_NS, 5)
MultU64x32 (SecondsToNanoSeconds, 5)
);
if (EFI_ERROR (Status)) {

View File

@@ -134,29 +134,21 @@ typedef struct _PING_PRIVATE_DATA {
PING_IPX_COMPLETION_TOKEN RxToken;
} PING_PRIVATE_DATA;
/**
Calculate the internet checksum (see RFC 1071).
@param[in] Packet Buffer which contains the data to be checksummed.
@param[in] Length Length to be checksummed.
@retval Checksum Returns the 16 bit ones complement of
ones complement sum of 16 bit words
**/
UINT16
EFIAPI
NetChecksum (
IN UINT8 *Buffer,
IN UINT32 Length
)
/*++
Routine Description:
Calculate the internet checksum (see RFC 1071)
Arguments:
Packet - Buffer which contains the data to be checksummed
Length - Length to be checksummed
Returns:
Checksum - Returns the 16 bit ones complement of
ones complement sum of 16 bit words
--*/
{
UINT32 Sum;
UINT8 Odd;
@@ -167,11 +159,11 @@ Returns:
Sum = 0;
Odd = (UINT8) (Length & 1);
Length >>= 1;
while (Length--) {
while ((Length--) != 0) {
Sum += *Packet++;
}
if (Odd) {
if (Odd != 0) {
Sum += *(UINT8 *) Packet;
}

View File

@@ -13,7 +13,7 @@
**/
#if !defined (_UEFI_SHELL_NETWORK1_COMMANDS_LIB_H_)
#ifndef _UEFI_SHELL_NETWORK1_COMMANDS_LIB_H_
#define _UEFI_SHELL_NETWORK1_COMMANDS_LIB_H_
#include <Uefi.h>