commit 3a413c07ce5492dc490f11811e3d380ececa60b8
parent 80117b0ff81a791d4b25d761d9ba18a50360a5c1
Author: kyle <kyle@0x30.net>
Date: Tue, 12 Jan 2016 23:25:23 -0700
sl: pass variable directly instead of copying it around
Diffstat:
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/server/sl b/server/sl
@@ -414,12 +414,9 @@ sub msg_friend_delete {
}
sub msg_lists_get {
- my ($sth, $msg) = @_;
-
- # Don't split incoming message as we only take a single argument here.
- my $device_id = $msg;
+ my ($sth, $device_id) = @_;
- my ($err) = device_id_valid($sth, $device_id);
+ my ($err, $phnum) = device_id_valid($sth, $device_id);
return "err\0$err" if ($err);
my $devid_fp = fingerprint($device_id);
@@ -458,10 +455,7 @@ sub msg_lists_get {
}
sub msg_lists_get_other {
- my ($sth, $msg) = @_;
-
- # Don't split incoming message as we only take a single argument here.
- my $device_id = $msg;
+ my ($sth, $device_id) = @_;
my ($err) = device_id_valid($sth, $device_id);
return "err\0$err" if ($err);