X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Ftty.c;h=852cee700ac2d6811a9dfad81665defd1566238d;hb=HEAD;hp=127878117e6f7146a29cd2cd75606feb2b38853f;hpb=ba7f7e053daae846a54a1d08d3d133a5f1266ace;p=ppp.git diff --git a/pppd/tty.c b/pppd/tty.c index 1278781..2531ce1 100644 --- a/pppd/tty.c +++ b/pppd/tty.c @@ -1,7 +1,7 @@ /* * tty.c - code for handling serial ports in pppd. * - * Copyright (C) 2000-2004 Paul Mackerras. All rights reserved. + * Copyright (C) 2000-2024 Paul Mackerras. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,14 +10,10 @@ * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - * 2. The name(s) of the authors of this software must not be used to - * endorse or promote products derived from this software without - * prior written permission. - * - * 3. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by Paul Mackerras - * ". + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. * * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY @@ -418,7 +414,7 @@ setescape(char **argv) ppp_option_error("can't escape character 0x%x", n); ret = 0; } else - xmit_accm[n >> 5] |= 1 << (n & 0x1F); + xmit_accm[n >> 5] |= 1U << (n & 0x1F); while (*p == ',' || *p == ' ') ++p; } @@ -435,7 +431,7 @@ printescape(struct option *opt, void (*printer)(void *, char *, ...), void *arg) for (n = 0; n < 256; ++n) { if (n == 0x7d) n += 2; /* skip 7d, 7e */ - if (xmit_accm[n >> 5] & (1 << (n & 0x1f))) { + if (xmit_accm[n >> 5] & (1U << (n & 0x1f))) { if (!first) printer(arg, ","); else @@ -454,7 +450,7 @@ void tty_init(void) { ppp_add_notify(NF_PID_CHANGE, maybe_relock, 0); the_channel = &tty_channel; - xmit_accm[3] = 0x60000000; + xmit_accm[3] = 0x60000000U; } /*