Bug 866833 - Drop never-checked and unnecessary 'rv' variables from nsControllerCommandTable.cpp. r=bz
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 29 Apr 2013 16:48:26 -0400
changeset 141220 5c8a29cfe00a12800a50ccfc0b494b963dcf35a9
parent 141219 795ce24dc1485b0f3faccaa68aaf2257afdbba24
child 141221 efa30046d86ea5c106d4c86cdce99aa7f7f50f3e
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs866833
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 866833 - Drop never-checked and unnecessary 'rv' variables from nsControllerCommandTable.cpp. r=bz
embedding/components/commandhandler/src/nsControllerCommandTable.cpp
--- a/embedding/components/commandhandler/src/nsControllerCommandTable.cpp
+++ b/embedding/components/commandhandler/src/nsControllerCommandTable.cpp
@@ -158,36 +158,34 @@ nsControllerCommandTable::DoCommand(cons
   return commandHandler->DoCommand(aCommandName, aCommandRefCon);
 }
 
 NS_IMETHODIMP
 nsControllerCommandTable::DoCommandParams(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandRefCon)
 {
   // find the command  
   nsCOMPtr<nsIControllerCommand> commandHandler;
-  nsresult rv;
-  rv = FindCommandHandler(aCommandName, getter_AddRefs(commandHandler));
+  FindCommandHandler(aCommandName, getter_AddRefs(commandHandler));
   if (!commandHandler)
   {
 #if DEBUG
     NS_WARNING("Controller command table asked to do a command that it does not handle -- ");
 #endif
     return NS_OK;    // we don't handle this command
   }
   return commandHandler->DoCommandParams(aCommandName, aParams, aCommandRefCon);
 }
 
 
 NS_IMETHODIMP
 nsControllerCommandTable::GetCommandState(const char *aCommandName, nsICommandParams *aParams, nsISupports *aCommandRefCon)
 {
   // find the command  
   nsCOMPtr<nsIControllerCommand> commandHandler;
-  nsresult rv;
-  rv = FindCommandHandler(aCommandName, getter_AddRefs(commandHandler));
+  FindCommandHandler(aCommandName, getter_AddRefs(commandHandler));
   if (!commandHandler)
   {
 #if DEBUG
     NS_WARNING("Controller command table asked to do a command that it does not handle -- ");
 #endif
     return NS_OK;    // we don't handle this command
   }
   return commandHandler->GetCommandStateParams(aCommandName, aParams, aCommandRefCon);