]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/tty.c
config: Include some extra files in the tarball
[ppp.git] / pppd / tty.c
index 127878117e6f7146a29cd2cd75606feb2b38853f..2531ce1e39dbd129c5584bf454bc8037e6bac967 100644 (file)
@@ -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
  * 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
- *     <paulus@samba.org>".
+ * 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;
 }
 
 /*