diff options
author | alex <alex@FreeBSD.org> | 2000-08-13 20:24:37 +0800 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 2000-08-13 20:24:37 +0800 |
commit | 6b5d9e7afc27bfc00f78e3d45eb6526293b55411 (patch) | |
tree | 22ffff7efd10620bfbcb169817b3994220b79efa /devel/cutils | |
parent | 0e376bad44fba3c1534d3847e75fa6ff3dcff79b (diff) | |
download | freebsd-ports-gnome-6b5d9e7afc27bfc00f78e3d45eb6526293b55411.tar.gz freebsd-ports-gnome-6b5d9e7afc27bfc00f78e3d45eb6526293b55411.tar.zst freebsd-ports-gnome-6b5d9e7afc27bfc00f78e3d45eb6526293b55411.zip |
Correct C-macro usage: One of the first lessions you learn is,
that you must not use something like macro(var++) if you don't know
the implementation of the macro.
PR: 20538
Submitted by: Kevin Day <toasty@dragondata.com>
Diffstat (limited to 'devel/cutils')
-rw-r--r-- | devel/cutils/files/patch-ab | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/devel/cutils/files/patch-ab b/devel/cutils/files/patch-ab new file mode 100644 index 000000000000..1b47162e5c62 --- /dev/null +++ b/devel/cutils/files/patch-ab @@ -0,0 +1,42 @@ +--- src/cobfusc/cobfusc.c.orig Wed Mar 26 07:58:16 1997 ++++ src/cobfusc/cobfusc.c Fri Aug 11 15:36:09 2000 +@@ -342,25 +342,31 @@ + /* + * Convert the string to uppercase. + */ +- while (*p) +- *p = toupper(*p++); ++ while (*p) { ++ *p = toupper(*p); ++ p++; ++ } + break; + case 2: + /* + * Convert the string to lowercase. + */ +- while (*p) +- *p = tolower(*p++); ++ while (*p) { ++ *p = tolower(*p); ++ p++; ++ } + break; + default: + /* + * Convert the string to random case. + */ +- while (*p) ++ while (*p) { + if (RANDOM(2) == 1) +- *p = toupper(*p++); ++ *p = toupper(*p); + else +- *p = tolower(*p++); ++ *p = tolower(*p); ++ p++; ++ } + } + + return buf; + |