Changeset 25468

Show
Ignore:
Timestamp:
05/12/08 09:27:56 (6 months ago)
Author:
jackburton
Message:

Removed PortQueue since it's not used. Small style (old) changes here
and there.

Location:
haiku/trunk
Files:
2 removed
3 modified

Legend:

Unmodified
Added
Removed
  • haiku/trunk/src/kits/app/Application.cpp

    r25091 r25468  
    209209        if (data->FindInt64("_pulse", &pulseRate) == B_OK) 
    210210                SetPulseRate(pulseRate); 
    211  
    212211} 
    213212 
     
    862861BApplication::GetAppInfo(app_info *info) const 
    863862{ 
     863        if (be_app == NULL || be_roster == NULL) 
     864                return B_NO_INIT; 
    864865        return be_roster->GetRunningAppInfo(be_app->Team(), info); 
    865866} 
     
    880881 
    881882        // App is already running. Get its entry ref with 
    882         // GetRunningAppInfo()   
     883        // GetAppInfo()  
    883884        app_info appInfo; 
    884         if (be_app && be_roster->GetRunningAppInfo(be_app->Team(), &appInfo) == B_OK) { 
     885        if (be_app && be_app->GetAppInfo(&appInfo) == B_OK) { 
    885886                ref = appInfo.ref; 
    886887                found = true; 
     
    890891        } 
    891892 
    892         if (found) { 
    893                 BFile file(&ref, B_READ_ONLY); 
    894                 if (file.InitCheck() == B_OK) { 
    895                         BResources *resources = new BResources(); 
    896                         if (resources->SetTo(&file, false) < B_OK) 
    897                                 delete resources; 
    898                         else 
    899                                 sAppResources = resources;                       
     893        if (!found) 
     894                return NULL; 
     895         
     896        BFile file(&ref, B_READ_ONLY); 
     897        if (file.InitCheck() == B_OK) { 
     898                sAppResources = new (nothrow) BResources(&file, false); 
     899                if (sAppResources != NULL 
     900                        && sAppResources->InitCheck() != B_OK) { 
     901                        delete sAppResources; 
     902                        sAppResources = NULL; 
    900903                } 
    901904        } 
  • haiku/trunk/src/kits/app/LinkReceiver.cpp

    r22115 r25468  
    5959LinkReceiver::GetNextMessage(int32 &code, bigtime_t timeout) 
    6060{ 
    61         int32 remaining; 
    62  
    6361        fReadError = B_OK; 
    6462 
    65         remaining = fDataSize - (fRecvStart + fReplySize); 
     63        int32 remaining = fDataSize - (fRecvStart + fReplySize); 
    6664        STRACE(("info: LinkReceiver GetNextReply() reports %ld bytes remaining in buffer.\n", remaining)); 
    6765 
     
    278276{ 
    279277        int32 length = 0; 
    280         status_t status; 
    281  
    282         status = Read<int32>(&length); 
     278        status_t status = Read<int32>(&length); 
     279 
    283280        if (status < B_OK) 
    284281                return status; 
    285282 
    286283        char *string; 
    287  
    288284        if (length < 0) { 
    289285                status = B_ERROR; 
     
    310306        if (_length) 
    311307                *_length = length; 
     308         
    312309        *_string = string; 
    313310 
     
    325322{ 
    326323        int32 length = 0; 
    327         status_t status; 
    328  
    329         status = Read<int32>(&length); 
     324        status_t status = Read<int32>(&length); 
     325 
    330326        if (status < B_OK) 
    331327                return status; 
     
    371367{ 
    372368        int32 length = 0; 
    373         status_t status; 
    374  
    375         status = Read<int32>(&length); 
     369        status_t status = Read<int32>(&length); 
     370 
    376371        if (status < B_OK) 
    377372                return status; 
  • haiku/trunk/src/kits/app/LinkSender.cpp

    r14799 r25468  
    196196        else if (newSize > kInitialBufferSize) 
    197197                newSize = (newSize + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1); 
    198  
    199         char *buffer = NULL; 
     198         
    200199        if (newSize == fBufferSize) { 
    201200                // keep existing buffer 
     
    206205 
    207206        // create new larger buffer 
    208         buffer = (char *)malloc(newSize); 
     207        char *buffer = (char *)malloc(newSize); 
    209208        if (buffer == NULL) 
    210209                return B_NO_MEMORY;