about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel Santos <dacs.git@brilhante.top>2022-05-13 14:15:08 +0100
committerDaniel Santos <dacs.git@brilhante.top>2022-05-13 14:15:08 +0100
commitb34afcd993eb0cbf2d043e6fad29bd6fd56af541 (patch)
tree2e929ec8310f65109b21eca45355f4762d2bddfc
parent81f8fd63a82915fc274c7cac10854cadf2f640f9 (diff)
downloadnumericx-c-b34afcd993eb0cbf2d043e6fad29bd6fd56af541.tar.gz
cli.c: usage with argv[0]
Instead of printing a usage message with the "numericx" string as a
program name, uses argv[0], better for debugging log readability.

Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
-rw-r--r--cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli.c b/cli.c
index 8ccf3dd..1d01239 100644
--- a/cli.c
+++ b/cli.c
@@ -111,7 +111,7 @@ main(int argc, char* argv[])
 	/* argument processing */
 	if( !(argc == 2) )
 	{
-		fprintf(stderr, "usage: %s <number>\n", "numericx");
+		fprintf(stderr, "usage: %s <number>\n", argv[0]);
 		return E2BIG;
 	}
 
d='n131' href='#n131'>131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219