I think they're doing the same thing.  I'm not sure which is more appropriate-- these two lines are based on a snippet found online.