aboutsummaryrefslogtreecommitdiff
path: root/toys/example/skeleton.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-03-06 21:27:25 -0600
committerRob Landley <rob@landley.net>2016-03-06 21:27:25 -0600
commit2a26ba451a605c185242de50e1d91eeac0a2430e (patch)
tree2096da5439976686aade867d29be270cdfa3112b /toys/example/skeleton.c
parent21701f1b61f1d92db05062be4ef6fd5989cacba7 (diff)
downloadtoybox-2a26ba451a605c185242de50e1d91eeac0a2430e.tar.gz
Fix warning (toys.optflags is a long long now).
Diffstat (limited to 'toys/example/skeleton.c')
-rw-r--r--toys/example/skeleton.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/toys/example/skeleton.c b/toys/example/skeleton.c
index 99e771aa..ee67b58f 100644
--- a/toys/example/skeleton.c
+++ b/toys/example/skeleton.c
@@ -1,4 +1,5 @@
/* skeleton.c - Example program to act as template for new commands.
+ * (Although really, half the time copying hello.c is easier.)
*
* Copyright 2014 Rob Landley <rob@landley.net>
*
@@ -70,7 +71,7 @@ void skeleton_main(void)
// Command line options parsing is done for you by lib/args.c called
// from main.c using the optstring in the NEWTOY macros. Display results.
- if (toys.optflags) printf("flags=%x\n", toys.optflags);
+ if (toys.optflags) printf("flags=%llx\n", toys.optflags);
if (toys.optflags & FLAG_a) printf("Saw a\n");
if (toys.optflags & FLAG_b) printf("b=%s\n", TT.s.b_string);
if (toys.optflags & FLAG_c) printf("c=%ld\n", TT.s.c_number);
@@ -95,7 +96,7 @@ void skeleton_main(void)
void skeleton_alias_main(void)
{
printf("Ran %s\n", toys.which->name);
- printf("flags=%x\n", toys.optflags);
+ printf("flags=%llx\n", toys.optflags);
// Note, this FLAG_b is a different bit position than the other FLAG_b,
// and fills out a different variable of a different type.