Branch: Tag:

2003-09-01

2003-09-01 16:37:32 by Martin Nilsson <mani@lysator.liu.se>

Don't pretend return is a function.

Rev: lib/modules/Locale.pmod/Language.pmod/rus.pmod:1.2
Rev: lib/modules/Locale.pmod/Language.pmod/slv.pmod:1.2
Rev: lib/modules/Locale.pmod/Language.pmod/swe.pmod:1.2
Rev: lib/modules/Protocols.pmod/IMAP.pmod/requests.pmod:1.92
Rev: lib/modules/Protocols.pmod/IMAP.pmod/types.pmod:1.29
Rev: lib/modules/Protocols.pmod/LDAP.pmod/client.pike:1.50
Rev: lib/modules/Protocols.pmod/LDAP.pmod/protocol.pike:1.10
Rev: lib/modules/Protocols.pmod/SNMP.pmod/getcmd.pike:1.6
Rev: lib/modules/Protocols.pmod/SNMP.pmod/protocol.pike:1.12

17:   //! 2570 : v3 description   //!    - // $Id: protocol.pike,v 1.11 2003/04/23 14:01:57 nilsson Exp $ + // $Id: protocol.pike,v 1.12 2003/09/01 16:35:09 nilsson Exp $         #include "snmp_globals.h"
241:    mapping rv;       rv = read(); -  return(rv); +  return rv;   }      //! decode ASN1 data, if garbaged ignore it
258:    "version":xdec->elements[0]->value,    "community":xdec->elements[1]->value,    "op":xdec->elements[2]->get_tag(), -  "attribute":Array.map(xdec->elements[2]->elements[3]->elements, lambda(object duo) { return(([(array(string))(duo->elements[0]->id)*".":duo->elements[1]->value])); } ) +  "attribute":Array.map(xdec->elements[2]->elements[3]->elements, lambda(object duo) { return ([(array(string))(duo->elements[0]->id)*".":duo->elements[1]->value]); } )    ]);    -  return(([msgid:msg])); +  return ([msgid:msg]);   }      
282:       msg = msgpool[msgid];    msgpool -= ([msgid:msg]); -  return(msg); +  return msg;   }      
292:       mapping rv = from_pool((string)msgid);    if(rv) -  return(rv); +  return rv;      #define HACK 1   #ifdef HACK
300:    to_pool(tmpm);   #endif    -  return(from_pool((string)msgid)); +  return from_pool((string)msgid);   }      
323:    DWRITE(sprintf("protocol.writemsg: %O\n", rawd));       msize = send(rem_addr, rem_port, rawd); -  return(msize = sizeof(rawd) ? SNMP_SUCCESS : SNMP_SEND_ERROR); +  return (msize = sizeof(rawd) ? SNMP_SUCCESS : SNMP_SEND_ERROR);   }      
333:    //LOCK    int rv = request_id++;    //UNLOCK -  return(rv); +  return rv;   }      //:
343:    mapping rawpdu = readmsg_from_pool(msgid);       -  return(({rawpdu})); +  return ({rawpdu});   }      //!
365:    foreach(varlist, string varname)    vararr += ({Standards.ASN1.Types.asn1_sequence(    ({Standards.ASN1.Types.asn1_identifier( -  @Array.map(varname/".", lambda(string el){ return((int)el);})), +  @Array.map(varname/".", lambda(string el){ return (int)el;})),    Standards.ASN1.Types.asn1_integer(1)}) //doesn't sense but req    )});   
391:    switch(type) {    case "oid": // OID    rv = Standards.ASN1.Types.asn1_identifier( -  @Array.map(val/".", lambda(string el){ return((int)el);})); +  @Array.map(val/".", lambda(string el){ return (int)el;}));    break;       case "int": // INTEGER
480:    if(arrayp(varlist[varname]) || sizeof(varlist[varname]) > 1) {    vararr += ({Standards.ASN1.Types.asn1_sequence(    ({Standards.ASN1.Types.asn1_identifier( -  @Array.map(varname/".", lambda(string el){ return((int)el);})), +  @Array.map(varname/".", lambda(string el){ return (int)el;})),    mk_asn1_val(varlist[varname][0], varlist[varname][1])})    )});    }
520:    foreach(varlist, string varname)    vararr += ({Standards.ASN1.Types.asn1_sequence(    ({Standards.ASN1.Types.asn1_identifier( -  @Array.map(varname/".", lambda(string el){ return((int)el);})), +  @Array.map(varname/".", lambda(string el){ return (int)el; })),    Standards.ASN1.Types.asn1_integer(1)}) //doesn't sense but req    )});   
589:    foreach(indices(varlist), string varname)    vararr += ({Standards.ASN1.Types.asn1_sequence(    ({Standards.ASN1.Types.asn1_identifier( -  @Array.map(varname/".", lambda(string el){ return((int)el);})), +  @Array.map(varname/".", lambda(string el){ return (int)el; })),    mk_asn1_val(varlist[varname][0], varlist[varname][1])})    )});   
670:    foreach(indices(varlist), string varname)    vararr += ({Standards.ASN1.Types.asn1_sequence(    ({Standards.ASN1.Types.asn1_identifier( -  @Array.map(varname/".", lambda(string el){ return((int)el);})), +  @Array.map(varname/".", lambda(string el){ return (int)el; })),    mk_asn1_val(varlist[varname][0], varlist[varname][1])})    )});    pdu = Protocols.LDAP.ldap_privates.asn1_context_sequence(4,