What's the advantage (if any) from using a temporary pointer (tmp) rather than working with the s directly?
Type: Posts; User: cerr
What's the advantage (if any) from using a temporary pointer (tmp) rather than working with the s directly?
Oh yes, that's what it was! Thank you!
Hi,
I want to implement a version of strlwr() but can't seem to be copying the lower case value back into the string.
My test program with the function looks like:
#include <stdio.h>...
yep, got it, thanks! :)
Hi,
I have an enum like:
typedef enum mac_type_e {
STATIC_MAC,
BLACKLIST_MAC
} mac_type_t;
and I want to use this type in a structure that's declared like:
I reaklized that my problem is, where I print out my mac. In the original code I was only printing the pointer to where the mac is located instead of dereferenced byte-by-byte. I changed it and it...
You are exactly right!
Ron
Right,
that's not going to return the right size, is it?
Okay, so I included noew an additional sizxe argument and changed my callers to
Save(fname, bar, sizeof(bar)); and
Load(fname, res,...
Hi,
I would like to write a complete structure array to a file and read it back, recovering all the data. I have tried the following:
#include <stdio.h>
#include <string.h>
#define NUM 256
...
[resolved - fixed]
Hi There,
I would like to compile valgrind on a ulibC system but it's making me troubles and I can't figure out how to resolve them... :(
The output i'm getting is like this:
...
Okay, I found one of the SIGSEGVs I believe. It's because pointers were freed but not set to NULL which would cause stale pointers... that'been corrected.
However, I still seem to be getting a...
Nah, haven't gotten the code compiled to run on our target platform yet... :(
Okay, I will have to look into this more. The problem is, this code isnt' from me and i hoped that there would be some kind of mechanism to react upon a seg fault like the try/catch() statements in...
Hi There,
I'm still afflicted by SIGKILLs in my application and I have not been able to locate the error with gdb and instead I put on strace now. And following output is what i got just before...
Well the actual malloc code looks like:
head = (node_t *) malloc(sizeof(node_t));
if (!head)
return PRS_MEMORY_FAILURE;
/*set the node to initial values */
...
Okay, yay,
good morning... :) let's look at that again today. So gdb tells me:
And the code around those line looks like:
if (head->next) {
_check_node = head->next;
...
Hi,
I found another segfault in my app with gdb:
Program received signal SIGSEGV, Segmentation fault.
0x0804cb3e in main (argc=1, argv=0xbfc71904) at main.c:978
978 ...
Hold-on. I just realized that I need to have two if statements, sorry, makes sense now... :o
Hi There,
I just caught a SEGFAULTR with gdb:
Program received signal SIGSEGV, Segmentation fault.
0x0804cb4c in main (argc=1, argv=0xbf9f6894) at main.c:979
979 if...
Also i have downloaded and compiled strace onto my target platform but when i start it with ./strace ./prs I just get a bunch of information before it throws me back to the shell saying
getppid() =...
:o Now I just realized that (at least) one thread in my application terminated like before witha SIGKILL but i didn't see anything in gdb... :o How would that be? I'm using gdb to connect to the...
info signals
Doesn't really tell me anything. It prints a list of signals and SIGKILL shows up like:
SIGKILL Yes Yes Yes Killed
which doesn't really help either, eh?...
GDB says:
Program terminated with signal SIGKILL, Killed.
The program no longer exists.
(gdb)
and ayou say
The OS never automatically generates SIGKILL - how sure are you about that I'm...
yes, /etc/hostname is correct (ping MyHostname) is working fine too. To my platform, I'm running on a x86 AMD Geode that is running a minimized BusyBox Linux distribution with kernel 2.6.15.1 on...