Prevent unnecessary (superfluous) initialization of return variable (#4490)

This commit is contained in:
Frank Wessels 2017-06-07 17:24:46 -07:00 committed by Dee Koder
parent 999ae1cb96
commit 7dcc1e92b4

View File

@ -259,15 +259,14 @@ func validateNotificationConfig(nConfig notificationConfig) APIErrorCode {
// - kafka
// - webhook
func unmarshalSqsARN(queueARN string) (mSqs arnSQS) {
mSqs = arnSQS{}
strs := strings.SplitN(queueARN, ":", -1)
if len(strs) != 6 {
return mSqs
return
}
if serverConfig.GetRegion() != "" {
region := strs[3]
if region != serverConfig.GetRegion() {
return mSqs
return
}
}
sqsType := strs[5]
@ -294,5 +293,5 @@ func unmarshalSqsARN(queueARN string) (mSqs arnSQS) {
mSqs.AccountID = strs[4]
return mSqs
return
}