Преглед изворни кода

Fixed coding style and improved comments. Fixed typo in error message.


git-svn-id: https://svn.microneil.com/svn/SNFMilter/trunk@11 2c985dca-31e6-41a4-b4a2-d8f5b7f8e074
master
adeniz пре 15 година
родитељ
комит
2d81e0f1d2
2 измењених фајлова са 10 додато и 5 уклоњено
  1. 5
    0
      ChangeLog
  2. 5
    5
      SNFMilter.cpp

+ 5
- 0
ChangeLog Прегледај датотеку

@@ -1,3 +1,8 @@
2009-06-18 Alban Deniz <adeniz@skidmark.localdomain>

* SNFMilter.cpp (getContextFromCtx): Fixed coding style, added
comment.

2009-06-06 Alban Deniz <adeniz@skidmark.localdomain>

* Makefile.am: Install/uninstall SNFDebugMilter link to SNFMilter.

+ 5
- 5
SNFMilter.cpp Прегледај датотеку

@@ -36,10 +36,10 @@ sfsistat SkipReturn = SMFIS_CONTINUE;
//
// \throws runtime_error if the obtained pointer is 0.
//
SNFMilterContext *
SNFMilterContext*
getContextFromCtx(SMFICTX* Ctx) {
SNFMilterContext* Context = (SNFMilterContext*) smfi_getpriv(Ctx);
if(0 == Context) throw runtime_error("Got NULL from snfi_getpriv()");
SNFMilterContext* Context = (SNFMilterContext*) smfi_getpriv(Ctx); // Get the context object.
if(0 == Context) throw runtime_error("Got NULL from smfi_getpriv()");
return Context;
}
@@ -51,9 +51,9 @@ getContextFromCtx(SMFICTX* Ctx) {
//
// \throws runtime_error if the obtained pointer is 0.
//
SNFMilterContext *
SNFMilterContext*
assignContextToCtx(SMFICTX* Ctx) {
SNFMilterContext *Context = MilterContexts->grab(); // Get any existing context object.
SNFMilterContext* Context = MilterContexts->grab(); // Get any existing context object.
if(0 == Context) // Check address.
throw runtime_error("Got NULL from MilterContexts->grab()");
smfi_setpriv(Ctx, Context); // Save the context object.

Loading…
Откажи
Сачувај