build: fix problems found with unconvert

This commit is contained in:
Nick Craig-Wood
2019-02-02 11:45:07 +00:00
parent a551978a3f
commit d966cef14c
19 changed files with 29 additions and 29 deletions
+2 -2
View File
@@ -158,7 +158,7 @@ func (cds *contentDirectoryService) Handle(action string, argsXML []byte, r *htt
}, nil
case "Browse":
var browse browse
if err := xml.Unmarshal([]byte(argsXML), &browse); err != nil {
if err := xml.Unmarshal(argsXML, &browse); err != nil {
return nil, err
}
obj, err := cds.objectFromID(browse.ObjectID)
@@ -179,7 +179,7 @@ func (cds *contentDirectoryService) Handle(action string, argsXML []byte, r *htt
}
return
}():]
if browse.RequestedCount != 0 && int(browse.RequestedCount) < len(objs) {
if browse.RequestedCount != 0 && browse.RequestedCount < len(objs) {
objs = objs[:browse.RequestedCount]
}
result, err := xml.Marshal(objs)